form 表单中onsubmit()与submit()区别

WBOY
Release: 2016-06-01 09:54:53
Original
1376 people have browsed it

onsubmit()是一个js事件,该事件会在表单提交时触发。想了解更多onsubmit()知识可以看这篇文章。

而submit是一个方法,该方法用于提交form表单。想了解更多submit知识可以看这篇文章。

由此可以看出二者操作的前后顺序,onsubmit()在前,submit在后。

下面是onsubmit()与submit()区别的实例。

 
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!