我有一对,我用这个按钮提交:jQuery的提交将无法提交表单
<button id="registerButton" type="submit" name="submit" style="margin-left: 300px;">Click to Complete</button>
我做的错误与这个jQuery检查:
$('#registerButton').bind('click',function(){
if($('#formElem').data('errors')){
alert('Please correct the errors in the Form');
return false;
}
});
当我去提交如果在表单上检测到错误,它将弹出警报。但是,如果没有错误,按钮不会执行任何操作。我究竟做错了什么?
应该将#form-element作为提交按钮的ID还是表单的ID? – 2012-03-14 22:54:07
@王子,形式:) – Starx 2012-03-14 22:55:43
不幸的是,这是有希望的,但它没有工作提交表单。有没有工具,我可以用来查看错误发生的地方,当我点击提交按钮,并没有错误? – 2012-03-14 22:57:50