手机
当前位置:查字典教程网 >软件教程 >编程开发 >去掉Myeclipse对JS等文件的验证(Cannot return from outside a function or method)
去掉Myeclipse对JS等文件的验证(Cannot return from outside a function or method)
摘要:在用Myeclipse导入新工程或在写代码时,最郁闷的就是它对js,jsp,html的验证太严格了,有时会呈现一个红叉或者一个黄色的感慨号,...

在用Myeclipse导入新工程或在写代码时,最郁闷的就是它对js,jsp,html的验证太严格了,有时会呈现一个红叉或者一个黄色的感慨号,一运行就报Cannot return from outside a function or method的错,为此讲解两个解决办法,本文解决Cannot return from outside a function or method的错。

方法/步骤

1、选中当前工程,右键单击properties,弹出properties界面

去掉Myeclipse对JS等文件的验证(Cannot return from outside a function or method)1

2、然后选择MyEclipse—>validation—>Excluded Resource下找到不需要验证的文件或者文件夹

去掉Myeclipse对JS等文件的验证(Cannot return from outside a function or method)2

3、在不需要验证的文件或者文件夹前打勾,然后点击 "OK"按钮保存。我的js,jsp,html在webroot下,所以我

去掉Myeclipse对JS等文件的验证(Cannot return from outside a function or method)3

4、解决Cannot return from outside a function or method报的错。法一:在MyEclipse菜单栏window --->preferences --->myeclipse --->validation --->javascript validator for Js files 把Bulid 复选框的勾去掉 就可以了

去掉Myeclipse对JS等文件的验证(Cannot return from outside a function or method)4

5、法二:在所建立的工程项目上右键单击,找到myeclipse-->Exclude Form Validation单击一下,打上√号,js的错误就没了!

去掉Myeclipse对JS等文件的验证(Cannot return from outside a function or method)5

注意:上面介绍了如何去掉Myeclipse对JS等文件的验证,一个从根本上解决问题,一个是解决报错的问题。

【去掉Myeclipse对JS等文件的验证(Cannot return from outside a function or method)】相关文章:

SQLSERVER误删SA密码 无法Windows登录用户的解决办法

DW制作挂历样式的文字轮播滚动的jquery特效

eclipse无法安装插件提示duplicate location怎么办?

MyEclipse怎么配置jdk? myeclipse配置jdk的图文教程

myeclipse误删的项目文件怎么找回?

windows安装redis缓存使用图文教程

svn建立分支和svn代码合并的操作方法

Dreamweaver创建表格和表格的编辑方法介绍

预防查询语句数据库注入漏洞攻击

visual foxpro9.0 中文版图文安装教程(附下载地址)

精品推荐
分类导航