工具:MyEclipse
方法/步骤
1、选中当前工程,右键单击properties,弹出properties界面
2、然后选择MyEclipse—>validation—>Excluded Resource下找到不需要验证的文件或者文件夹
3、在不需要验证的文件或者文件夹前打勾,然后点击 "OK"按钮保存。如js,jsp,html在webroot下,为了解决Cannot return from outside a function or method报的错,勾上webroot。
4、在MyEclipse菜单栏window --->preferences --->myeclipse --->validation --->javascript validator for Js files 把Bulid 复选框的勾去掉 就可以了。
在js文件上右键,找到myeclipse 有个p开头的,可以忽略错误