【发布时间】:2018-10-29 10:57:57
【问题描述】:
我有一个文本框和一个带有“必需”属性的清单,当我按下按钮转到下一页而不填写两个输入时,它们不会验证它们是否已填写。
<form id="form" method="" action="">
<input type="text" name="dressPrice" id="price" class="control" onkeypress="return numberFilter(event)" dir="rtl" onpaste="return false" required />
<input type="checkbox" id="cbox1" required /><label class="tac-label"> I accept the <a href="terms-and-conditions.html" class="tac-link">terms and conditions.</a>
<a href="buy-step-02.html" class="btn is-small" type="submit">Search</a>
</form>
最奇怪的部分是,我有另一个带有表单的 HTML 页面,并且那里输入的“必需”属性工作得很好。任何人都知道为什么会发生这种情况?
我认为这不是兼容性问题。
【问题讨论】: