$(document).ready(function(){
$('.gbutton').click(function(){
text=$("#textid").val();
$.ajax({
type: "POST",
url : "postquery.php",
data: "text="+text,
beforeSend: function(){
$('#loading').show();
}
success: function(html)
{
$('#new_query_post').html(html);
}
});
});
});
此代码在没有beforeSend函数的情况下正常工作,但在添加beforeSend函数时完全停止..
答案 0 :(得分:1)
在,
beforeSend
beforeSend: function(){
$('#loading').show();
}, /*
^ */
success: function(html){
$('#new_query_post').html(html);
}