submit and onsubmit (transfer), submitonsubmit_PHP tutorial

WBOY
Release: 2016-07-13 16:53:58
Original
1574 people have browsed it

submit and onsubmit (transfer), submitonsubmit

order of occurrence: onsubmit -> submit

1. Block form bill of lading:

<script><br>function submitFun(){<br> //Logical judgment<br> return true; //Allow form submission<br> //Logical judgment<br> return false;//Not allowed Form submission<br>}<br></script>

//Note that onsubmit=" cannot be written here submitFun();"Otherwise the form will always be submitted

2.onsubmit() and submit():

<script><br>function fun()<br>{<br> alert("form_submit");<br>}<br></script>








www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1053800.htmlTechArticlesubmit and onsubmit (transfer), submitonsubmit occurs in sequence: onsubmit - submit 1. Prevent form bill of lading: script function submitFun( ){ //Logical judgment return true; //Allow form submission //Logic...
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template