如何設置使用JQuery的跨度值的跨度..如何設置一個值,使用JQuery
例如... 下面是我的跨度
<span id="submittername"></span>
在我的jQuery代碼...
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($){
var invitee = $.ajax({
type: "GET",
url: "http://localhost/FormBuilder/index.php/reports/getInvitee/<?=$submitterid;?>",
async: false
}).responseText;
var invitee_email=eval('(' + invitee + ')');
var submitter_name=$.map(invitee_email.invites, function(j){
return j.submitter;
});
alert(submitter_name); // alerts correctly
$("#submittername").text(submitter_name); //but here it is not working WHy so??????
});
你拼錯跨度的ID(提交的,而不是submittername)。 – kgiannakakis 2009-09-29 10:35:02