Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用这个插件来验证一些 html 字段。
但是在第二次点击“btnGravar”之后,这些字段被隐藏了,只是随着“display:none”消失......
有人知道为什么吗?
源代码
我建议您更改“btnGravar”的类型以提交,并且不要在单击此按钮时进行任何类型的事件处理,然后您的表单将被 jQuery 自动检查,直到它被完全验证。而不是这个:
<input type="button" id="btnGravar" value="Gravar"/>
用这个:
<input type="submit" id="btnGravar" value="Gravar"/>