Home>Article>Web Front-end> What to do if jquery cannot be referenced
Solutions to the inability to reference jquery: 1. Check and modify the reference path; 2. Because the html element does not meet the standards, just place the jquery method below the form.
The operating environment of this tutorial: windows7 system, jquery1.2.6 version, DELL G3 computer.
Recommended:jquery video tutorial
Problem description: jquery.js cannot be referenced in the project or cannot be used normally after being referenced.
Solution:
Check and modify the html elements; the reasons found on the Internet for not working properly are:
1. Wrong reference path
2. The html element does not meet the standards, eg: div is nested inside span, and form is nested within form
After checking, my path is correct and there is no nesting error. The final solution is to place the jquery method below the form.
Because jquery was rarely used before, here is a record of how to use jquery verification. Of course, specific problems will be solved on a case-by-case basis.
1. Introduction of jquery.js and jquery.validate.js
2. Contents in the form
3. jquery verification
The above is the detailed content of What to do if jquery cannot be referenced. For more information, please follow other related articles on the PHP Chinese website!