jQuery API 返回首页目录 | jQuery API 中英文对照版
submit
submit()

触发每一个匹配元素的submit事件。这个函数会调用执行绑定到submit事件的所有函数。

注意:这个函数不会调用form元素的submit方法!如果需要通过代码来提交表单,必须使用DOM方法,例如:$("form")[0].submit();

返回值:jQuery

示例:

触发注册到表单的所有submit事件,但不提交表单。

$("form").submit();

 
submit()

Trigger the submit event of each matched element. This causes all of the functions that have been bound to that submit event to be executed, and calls the browser's default submit action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the submit event.

Note: This does not execute the submit method of the form element! If you need to submit the form via code, you have to use the DOM method, eg. $("form")[0].submit();

Return value: jQuery
Example:

Triggers all submit events registered to the matched form(s), and submits them.

 $("form").submit();  
相关链接
asp之家 | jQuery官方网站 | jQuery中文网 | 电子书作者网站 | 电子书作者blog