Javascript JQuery UI 最小脚本错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10410191/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 01:11:52  来源:igfitidea点击:

JQuery UI min script errors

javascriptjqueryeclipsejquery-ui

提问by jilt3d

Does anyone get errors from Eclipse IDE (Indigo release) when using jquery-ui-1.8.19.custom.min.js? It seems that the script is working properly, I do not get any errors from the browsers.

使用 jquery-ui-1.8.19.custom.min.js 时,是否有人从 Eclipse IDE(Indigo 版本)中收到错误消息?脚本似乎工作正常,我没有从浏览器中收到任何错误。

I created a custom JQuery UI theme and downloaded it from JQuery site but I get 3 main errors when I put the script into a Maven project in Eclipse.

我创建了一个自定义 JQuery UI 主题并从 JQuery 站点下载了它,但是当我将脚本放入 Eclipse 中的 Maven 项目时,我遇到了 3 个主要错误。

Cannot return from outside a function or method
Syntax error on token "Invalid Regular Expression Options", no accurate correction available
Syntax error, insert ")" to complete Arguments

无法从函数或方法外部返回
标记“无效的正则表达式选项”上的
语法错误,没有可用的准确更正语法错误,插入“)”以完成参数

and dozens of missing semicolonwarnings...

和几十个missing semicolon警告......

回答by Simon

The first result in Google for "jquery ui eclipse warnings" is this bug report.

Google 中“jquery ui eclipse warnings”的第一个结果是这个错误报告

Comment 15has a suggested work around for getting the validator to ignore certain files, might be worth trying.

评论 15有一个让验证器忽略某些文件的建议解决方法,可能值得一试。

回答by Nalakap

You must ignore the specific project in the JavaScript Validator Go: Project->Properties->JavaScript->Include Path->Source.

必须在 JavaScript Validator Go 中忽略特定项目:Project->Properties->JavaScript->Include Path->Source。

Refer the Following

参考以下

回答by Rakesh Kumar Gupta

For this type of error, you no need to worry. you just need to bypass the validation error so you need to ignore java-script Validator library in the source code.

对于此类错误,您无需担心。您只需要绕过验证错误,因此您需要忽略源代码中的 java-script Validator 库。

Go: Project->Properties->JavaScript->Include Path->Source => include Click on include and clean the project. Now your project will be error free. Thanks. Rakesh 7358490865

转到:Project->Properties->JavaScript->Include Path->Source => include 点击 include 并清理项目。现在您的项目将没有错误。谢谢。拉克什 7358490865