【发布时间】:2015-01-08 18:08:12
【问题描述】:
我遇到了一个令我完全困惑的 WC3 错误。
标签元素的for属性必须引用表单控件。 …你是人:在盒子里写代码 »
<label for="txtCaptcha"> Write code in box » <span id="txtCaptchaDiv" style="color:#29372F; font-weight:bold;"></span><!-- this is where the script will place the generated code -->
<input type="hidden" id="txtCaptcha" name="txtCaptcha"/></label><!-- this is where the script will place a copy of the code for validation: this is a hidden field -->
<input type="text" name="txtInput" id="txtInput" size="30" />
我有 for="txtCaptcha" 指的是隐藏的输入控件 ID,所以我不确定 WC3 在说什么。任何帮助将不胜感激。
要求提供更多信息。我试图将整个表单放在这里,但由于某种原因,代码块不接受所有代码。它将它分解,然后当我尝试提交时,它不会让我因为代码不在代码块中。
页面在这里http://skeeterz71.com/gothic/quote-page.html line 641 第 641 行,第 55 列:标签元素的 for 属性必须引用表单控件。 …你是人:在盒子里写代码 »
谢谢
【问题讨论】:
-
为什么隐藏的输入应该有标签?有意义吗?
标签: javascript forms