Recently, when doing form verification, the Addmethod method of his own writing always does not work, tossing the time close to the day. The following errors are reported
- uncaught Typeerror:cannot Read Property ' call ' of undefinedjquery.validate.min.js:28
- First look at the layout of my own page.
- top.jsp
- The above-referenced form for the top.jsp header verifies the Jquery-1.6.js and Jquery.validate.min.js
- I came to see the JSP layout (stepthree.jsp) of the page I needed to verify.
We see that this page is referenced by JSP directives to the top.jsp page to stepthree.jsp, we see <jsp:include tags introduced in the top.jsp put in we need to verify the stepcommon.js below, so it is very easy to have problems, their reference order is not correct, resulting in a lot of jquery problems will appear, give us the hint is that when our own page to reference jquery to help us write JS, must be placed inthe front, the entire page should not be introduced repeatedly. Correct to see as direct top.jsp placed in the first position of the stepthree.jsp page, so that the third party referred to in the top.jsp JS such as:Jquery-1.6.js and jquery.validate.min.js can be directly referenced in the stepthree.jsp page without the need for repeated re-introduction. The above error page naturally disappears.