在实验室的电脑上web项目正常运行,没有报错,回来在自己的myeclipse上导入项目,却发现jsp中“Cannot return from outside a function or method” 提示return出错,在网上查了一下,解决方法如下:

1.jsp网页出现“Cannot return from outside a function or method” 提示return出错时:

打开window -->preferences -->myeclipse -->validation-->右边框 -->javascript validator for Js   files 把Bulid 复选框的勾去掉,点击右下角的apply之后等待一分钟便生效。

Cannot return from outside a function or method


2.onSubmit(),  false  仍然跳转,onSubmit="return checkForm()" ,onsubmit属性中要写"return checkForm()",而不仅仅是
"  checkForm()"


相关文章:

  • 2022-12-23
  • 2021-08-25
  • 2021-12-19
  • 2021-09-21
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-06
  • 2022-12-23
  • 2021-07-25
  • 2021-09-09
相关资源
相似解决方案