简体   繁体   English

MyEclipse 在 JSP 中禁用 javascript 验证

[英]MyEclipse disable javascript validation in JSP

Is there a way I can disable js validation in jsp in myeclipse.有没有办法可以在myeclipse中禁用jsp中的js验证。 I have jsp page which has java script code in onclick of a button, something like below and jsp is showing syntax error saying there should be ;我有一个jsp页面,它在一个按钮的onclick中包含java脚本代码,如下所示,jsp显示语法错误,说应该有; instead on : after javascript so I want to disable js check in jsp.相反:javascript之后所以我想在jsp中禁用js检查。 I know to disable js validation in js file but not from jsp file.我知道在 js 文件中禁用 js 验证,但不能从 jsp 文件中禁用。

<button onclick="javascript:var .....some js code">Button</button>

Go to MyEclipse->Preferences->MyEclipse->Validation, where you can remove the JSP validators.转到 MyEclipse->Preferences->MyEclipse->Validation,您可以在其中删除 JSP 验证器。 You can also customise the JSP validator at MyEclipse->Preferences->Validation->JSP.您还可以在 MyEclipse->Preferences->Validation->JSP 中自定义 JSP 验证器。 In addition, you can exclude certain resources from validation by right-clicking on the project and selecting MyEclipse->Manage Validation, then excluding folders and/or files.此外,您可以通过右键单击项目并选择 MyEclipse->Manage Validation,然后排除文件夹和/或文件来从验证中排除某些资源。

I hope this helps.我希望这有帮助。

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

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