【发布时间】:2011-09-23 11:25:18
【问题描述】:
我只能修改ajax调用中的代码。
当我单击名为 $('#form1') 的表单中的提交时,会发生 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? I can only modify the code in the ajax call.
}
}
});
});
【问题讨论】:
标签: javascript jquery ajax