Solution to the idea:
The first is the analysis of the problem, at the time of submission of the problem, so from the JSP page submission method start
The original JSP page:
1 <!--submit button --2 <Divclass= "Ui-btn-wrap">3 <Buttonclass= "Ui-btn-lg ui-btn-primary">4 Determine5 </Button>6 </Div>
JS Code (check submit form):
1$(function(){2 //jquery.validate3$ ("#myform"). Validate ({4Submithandler:function() {5 //Verify that after the JS code is written here6 & ("#myform"). Submit ();7 }8 });9});
First, do not pass the verification, directly submit
JSP page button label modified as input box, add click event, define function, find can submit normally
The second judgment is not the problem of initializing the function, no problem
Third add validation discovery, submission slows
Modified JS code (check submission form): Red for the modified place
1$(function(){2 //jquery.validate3$ ("#myform"). Validate ({4Submithandler:function (form) {5 //Verify that after the JS code is written here6 form.submit ();7 }8 });9 Ten});
When the JSP page is submitted, the browser prompt is not responding because the script runs for a long time