first step:
Remove the JS verification of Eclipse:
Windows-> Preference-> Java Script-> Validator-> ERRORS/Warnings->
ENable Javascript Sematic Validation's preliminaries;
Step 2:
Right -click item -> Properties-> Builders Remove the hook in front of JavaScript Validator
If there is no JavaScript Validator in Builders. Then go to the .project file to modify the following content:
Find the project directory and delete the following parts in the .project file in the project directory:
<buildcommand>
<Name> Org.eclipse.wst.jsdt.core.javaScriptvalidator </name>
<arguments> </arguments>
</buildcommand>
And <nature> ORG.ECLIPSE.WST.JSDT.CORE.jsnature </nature>
Note that modify the .project file may require restart Eclipse, or turn off the project in Eclipse, and then reopen the project.
Step 3:
Copy the JS file to somewhere, and then directly delete the error JS file from the Eclipse, disappear the error, and then put it just now.
Come in a js file.
If the above is not right, open the Privems View in Eclipse, select related errors, and solve it according to the prompts.