Recently using JS to verify the legitimacy of the client input data, JS written well, put in the browser to run, Strange is JS does not work, and then use Fiebug to debug, see JS where out of the problem, but, Firebug always prompt did not find the script. Check the JSP page content and JS path problem, there is no problem, but, why Firebug is prompted not to find JS script it? Got a morning, wrote more than n JSP page and JS to test, and finally found a problem, if JS inside there are grammatical errors, such as Chinese and English punctuation is not clear, the string connection when no Plus +, so the JS is definitely problematic, so the browser can not recognize JS, So when writing the JS test client input, the first thing to check their own JS is correct: Grammar is not a problem, punctuation is the English state input.
Problems in using JS in JSP