can't return outside function or method解决方法
来源:互联网 发布:手机看网站源码 编辑:程序博客网 时间:2024/06/16 18:10
今天写web项目作业时,发现jsp中“Cannot return from outside a function or method” 提示return出错,百度了一下,网上说这是myeclipse的一个bug,去掉return就好了,去掉之后果然不报错,但是之后发现onSubmit()不能阻止表单提交,再百度之,原来这个return还真不能去掉。
以下就是今天错误的解决方法
1.jsp网页出现“Cannot return from outside a function or method” 提示return出错
window –>preferences –>myeclipse –>validation –>javascript validator for Js files 把Bulid 复选框的勾去掉,
myeclipse 重启之后便生效
2.onSubmit(), false 仍然跳转,onSubmit=”return checkForm()” ,onsubmit属性中要写”return checkForm()”,而不仅仅是
” checkForm()”
阅读全文
0 0
- can't return outside function or method解决方法
- 【解决方法】Cannot return from outside a function or method
- return confirm Cannot return from outside a function or method
- Cannot return from outside a function or method
- Cannot return from outside a function or method
- myeclipse10:Cannot return from outside a function or method.
- Cannot return from outside a function or method
- Cannot return from outside a function or method
- Cannot return from outside a function or method
- Cannot return from outside a function or method
- “Cannot return from outside a function or method”
- BUG:Cannot return from outside a function or method
- 【报错】Cannot return from outside a function or method
- Myeclipse出现Cannot return from outside a function or method
- Cannot return from outside a function or method
- Cannot return from outside a function or method
- Cannot return from outside a function or method
- myeclipse10 Cannot return from outside a function or method
- Linux:常用文件与目录操作命令
- MySQL官网的安装步骤,随时更新
- C++学习笔记14 V-Tables && 虚继承
- xp,rup,敏捷过程
- h264手动添加sps和pps到AVCodecContext->extradata
- can't return outside function or method解决方法
- 五、计算机网络之传输层
- 20170912_将一个整数转换为字符串
- 素数判断c++
- XMLHttpRequest Ajax 实例简介
- FileReader 文件读取
- 神兽保佑,代码无bug
- 在编写strcpy函数时的记录
- Javascript DOM(第二版) 动态创建标记---重回图片库