我只能修改Ajax调用 一个Ajax调用所做的代码的时候,当我点击如何阻止表单提交在一个Ajax调用
$('#form1').submit(function(){
$.ajax({
url:'some.php',
type:'POST',
data:somedata,
success:function(msg){
if(!msg){
//i wanna to stop form1 submit here,how to do that? you can only modify the code in the ajax call
}
}
})
})
Upvote。迄今为止唯一正确的答案。 AJAX异步工作! – avall