如何使用JQuery设置span的值
如何使用JQuery设置span的值.. 例如......下面是我的跨度 <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?????? }); #1楼 你可以做: