submit与onsubmit
发生顺序:onsubmit -> submit
1.阻止表单提单:
2.onsubmit()与submit() :
this.form.submit(); //直接提交表单,不触发onsubmit()
this.form.onsubmit(); //调用form的onsubmit方法
this.form.fireEvent('onsubmit'); //同上,
submit与onsubmit
发生顺序:onsubmit -> submit
1.阻止表单提单:
2.onsubmit()与submit() :
this.form.submit(); //直接提交表单,不触发onsubmit()
this.form.onsubmit(); //调用form的onsubmit方法
this.form.fireEvent('onsubmit'); //同上,
javascript学习之submit与onsubmit事件:等您坐沙发呢!