有两个解决方法:
方法一:myeclipse的校验去掉。
具体设置 window->preference->myeclipse->validation 去掉js的验证。
方法二:打开.project文件,注释掉里面的js验证。注意是这两处
<!--<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>-->
<!--<nature>org.eclipse.wst.jsdt.core.jsNature</nature>-->
然后重新编译一遍,问题就解决了。
转载于:https://blog.51cto.com/sheting/1321274