jQuery submit() 方法
jQuery 教程
· 2019-03-09 19:44:50
实例
当提交表单时,显示警告框:
$("form").submit(function(){
alert("提交");
});
alert("提交");
});
定义和用法
当提交表单时,会发生 submit 事件。
该事件只适用于 <form> 元素。
submit() 方法触发 submit 事件,或规定当发生 submit 事件时运行的函数。
语法
触发被选元素的 submit 事件:
$(selector).submit()
添加函数到 submit 事件:
$(selector).submit(function)
| 参数 | 描述 |
|---|---|
| function | 可选。规定当 submit 事件被触发时运行的函数。 |
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
Math Adventures with Python
Peter Farrell / No Starch Press / 2018-11-13 / GBP 24.99
Learn math by getting creative with code! Use the Python programming language to transform learning high school-level math topics like algebra, geometry, trigonometry, and calculus! In Math Adventu......一起来看看 《Math Adventures with Python》 这本书的介绍吧!