我的html像这样
jQuery代码如下
$("#postcontent").submit(function(e) {
$.ajax({
type:"POST",
url:"add_new_post.php",
data:$("#postcontent").serialize(),
beforeSend:function(){
$(".post_submitting").show().html("
![loading.gif](images/loading.gif)
},success:function(response){
//alert(response);
$("#return_update_msg").html(response);
$(".post_submitting").fadeOut(1000);
}
});
});
当我单击Submit按钮时,我的ajax请求无法正常工作,看起来好像控件正在传递给JQuery
Submit函数,但是ajax请求没有正确执行/正常工作,这是怎么回事?