简体   繁体   English

JavaScript / jQuery 在 Eclipse 中不起作用

[英]JavaScript / jQuery don't work in Eclipse

I don't want to provide a source code because the same code works perfectly on a different PC or on a different eclipse version.我不想提供源代码,因为相同的代码可以在不同的 PC 或不同的 Eclipse 版本上完美运行。 The project is a Java EE project with servlets and JSP-s, and I want to use some js functions in a JSP file.该项目是一个带有servlets和JSP-s的Java EE项目,我想在一个JSP文件中使用一些js函数。 How can I set my eclipse to understand and execute jQuery and JavaScript functions?如何设置我的 Eclipse 以理解和执行 jQuery 和 JavaScript 函数? BTW I have installed JSDT jQuery on my eclipse but still doesn't work.顺便说一句,我已经在 Eclipse 上安装了 JSDT jQuery,但仍然无法正常工作。 Thank you.谢谢你。

Have you searched for a plug-in?您是否搜索过插件?

http://marketplace.eclipse.org/content/jsdt-jquery was the last I've seen. http://marketplace.eclipse.org/content/jsdt-jquery是我最后看到的。 See if you can find the version of JQuery you're using on that site.看看您是否可以在该站点上找到您正在使用的 JQuery 版本。

Disclaimer, I'm the author of tern.java免责声明,我是tern.java的作者

I suggest you that you install tern.java which extends JSDT Editor and provides a jQuery support我建议你安装 tern.java ,它扩展了 JSDT 编辑器并提供了jQuery 支持

jQuery 完成

and too jQuery completion for CSS selectors以及CSS 选择器的 jQuery 补全

jQyery CSS 选择器完成

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM