Cannot return from outside a function or method.
来源:互联网 发布:动易cms 6.8 模板 编辑:程序博客网 时间:2024/05/22 19:26
今天在做一个删除功能,当点击删除按钮时,想要给用户一个提示,所以在jsp页面中就想通过 onclick="return confirm('确定要删除吗?')” 来实现,但是confirm()方法提示:Cannot return from outside a function or method。解决这个问题的方法很简单,总结一下有两种:
方法一
window --》preferences --> myeclipse --> validation -->javascript validator for Js files 把Build复选框的选项去掉就好了。
方法二
在当前项目右击,找到myeclipse -->Exclude Form Validation单击,可以看到出现了“√”,这时就不报错了。
方法三
去掉return关键字。
阅读全文
0 0
- 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
- 【解决方法】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
- Cannot return from outside a function or method
- Java中抽象类和接口的区别
- Linux常用命令大全
- Criteria .一种比hql更面向对象的查询方式(资料整理)
- C++虚函数与纯虚函数区别和重载的概念
- HTTPS 中双向认证
- Cannot return from outside a function or method.
- 原生HTML5关于Div对象的.clientLeft、.offsetLeft、.clientX、.offsetX区分
- 靠谱程序员必备技能——重构
- ext动态进度条
- 原生ajax请求与Promise请求
- Python+Opencv进行识别相似图片
- IPC-管道(匿名管道)
- git常用命令之git push使用说明
- 模版方法模式与策略模式如何让软件开发符合“开闭原则”