【发布时间】:2010-09-23 21:42:14
【问题描述】:
到目前为止我得到了这个:
$('.event-tools a').click(function()
{
var status = $(this).attr('id');
var id = $(this).parent().attr('id');
$.ajax({
type: "GET",
url: "http://localhost:8888/update/test.php",
data: "rsvp=" + status + '&id=' + id,
success: function()
{
$(this).parent().html(status);
//alert(status);
},
error: function()
{
alert('failz');
}
});
});
有了这个:
<span class="rsvp" id="1">
<a href="#" class="rsvp" id="Attending">Attending</a>
<a href="#" class="rsvp" id="Maybe Attending">Maybe Attending</a>
<a href="#" class="rsvp" id="Not Attending">Not Attending</a>
</span>
当我单击其中一个并使用alert() 时,它会通过提示警报框来工作,但是,当我在success: 事件上使用$(this).parent().html(status); 时,它不会使用@ 更改HTML 987654326@...
【问题讨论】:
-
我认为你的身份证不是有效身份证...