.asp 页面的 Jquery 验证

发布于 2024-12-11 05:56:05 字数 1014 浏览 0 评论 0原文

我正在尝试使用 Javascript 进行复选框验证,但我真的不确定如何应用我发现它有效的代码。如果页面位于 .html 中,则可以正常工作,但如果页面位于 .asp 中,则验证不起作用但我想使用 jquery 验证使其工作,这是我现在拥有的复选框代码

 $<input type="checkbox" name="entry.9.group" validate="required:true, minlength:2" value="Bank Transfer" id="group_9_1" />
  Bank Transfer ()<br />
  <input class="required" type="checkbox" name="entry.9.group" value="Call &amp; Collect" id="group_9_2" />
  Call me on my mobile (STS will call you in before end of the day)<br />
  <input type="checkbox" name="entry.9.group" value="Others" id="group_9_3"/>
  Others<br />

这些是我添加到标头中的 .js 文件

   <script src="js/jquery _2.js" type="text/javascript"></script>
   <script src="js/jquery.metadata _2.js" type="text/javascript"></script>
  <script src="js/jquery.validate.js" type="text/javascript"></script>

,我不确定如何让这两个工作? tks..btw 如果它有帮助的话,我正在从表单收集数据到谷歌电子表格,这就是为什么你看到 name="entry.9.group"

I am trying to have a checkboxes validation using Javascript, and i am really not sure how to apply this code that i found it working..if the page is in .html it works fine but if it is in .asp the validation doesnot work but i want to make it work using jquery validation this is the checkbox code that i have now

 
lt;input type="checkbox" name="entry.9.group" validate="required:true, minlength:2" value="Bank Transfer" id="group_9_1" />
  Bank Transfer ()<br />
  <input class="required" type="checkbox" name="entry.9.group" value="Call & Collect" id="group_9_2" />
  Call me on my mobile (STS will call you in before end of the day)<br />
  <input type="checkbox" name="entry.9.group" value="Others" id="group_9_3"/>
  Others<br />

These are the .js files that i added to my header

   <script src="js/jquery _2.js" type="text/javascript"></script>
   <script src="js/jquery.metadata _2.js" type="text/javascript"></script>
  <script src="js/jquery.validate.js" type="text/javascript"></script>

and i am unsure how to get these two to work? tks..btw if it helps i am collecting the data from the form to google spreadsheets that is why you are seeing the name="entry.9.group"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

纵情客 2024-12-18 05:56:05

好吧,我意识到我必须使用 C# 内置验证而不是 Java 验证。如果我确实想使用 java vlaidation 以防万一,那么最好坚持使用 HTML

Well i realised that i have to use the C# inbuilt validation rather than the Java validation. If i do want to use java vlaidation in case then its better to stick to HTML

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文