myeclipse10导入项目出现Cannot return from outside a function or method之解决方法

问题:

无法从外部返回函数或方法,如图所示:

myeclipse10导入项目出现Cannot return from outside a function or method之解决方法

解决方法:

方法一:window --- preferences --- myeclipse --- validation --- javascript validator for Js files,把Bulid 复选框的勾去掉即可,如图所示:

myeclipse10导入项目出现Cannot return from outside a function or method之解决方法

方法二:在所建立的项目中右键单击,找到myeclipse --- Exclude Form Validation单击一下,打上勾号,神奇的一幕到了,发现js的错误已经消失了。