jQuery 验证器插件锁定所需的复选框
我在这里创建了测试表单: http://www.sitecdn.net/clients/repcow/ form_min.html
复选框代码如下所示:
<div class="optIn">
<div id="line1">
<div class="checkbox"><input type="checkbox" checked="checked" value="true" name="MailingListOptIn"></div>
<div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
</div>
</div>
<div id="line2">
<div class="checkbox"><input type="checkbox" tabindex="6" title="This is required." class="required" value="true" name="TermsOfService"></div>
<div class=""><strong>I agree to the <a rel="tos_popup" name="tos" href="terms_of_service.html">Terms of Service</a>.</strong></div>
</div>
</div>
底部复选框按要求设置,在有人无法检查它之后,用户将看到错误消息,但在它之后复选框变得不活动(我无法单击它)。不知道我做错了什么。可能有 CSS 的东西吗?
谢谢
I have created test form here: http://www.sitecdn.net/clients/repcow/form_min.html
Code for checkboxes looks like:
<div class="optIn">
<div id="line1">
<div class="checkbox"><input type="checkbox" checked="checked" value="true" name="MailingListOptIn"></div>
<div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
</div>
</div>
<div id="line2">
<div class="checkbox"><input type="checkbox" tabindex="6" title="This is required." class="required" value="true" name="TermsOfService"></div>
<div class=""><strong>I agree to the <a rel="tos_popup" name="tos" href="terms_of_service.html">Terms of Service</a>.</strong></div>
</div>
</div>
bottom checkbox is set as required and after somebody will fail to check it user will see error message, but after it checkbox become not active (I can't click on it). No clue what I have done wrong. Possible something with CSS?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该复选框仍处于活动状态,但错误标签位于该复选框上方。只需调整布局...
错误就在这里:
这段代码搞乱了一切。删除或重做! ;)
提示!切勿使用绝对定位。除非你真的想要...
The checkbox still active but the error label is over the checkbox. Just adjust the layout...
the error is here:
this code is messing everything. Remove or redo it! ;)
Tip! Never work with absolute positioning. Unless you really want it ...