【发布时间】:2015-09-19 11:06:29
【问题描述】:
为什么 bootstrap 中输入的 required 属性不起作用?
<input type = "text" id = "thisisatext" class= "form-control" required>
【问题讨论】:
-
我在网页上有几个文本框。
-
但是我没有使用提交按钮,我使用了
-
如果你想要必填字段工作,它必须是一个表单。首先在表单和按钮onClick()之间理解清楚。我的回答解释清楚
-
您能推荐一些我可以在不使用表单的情况下用于验证空输入字段的东西吗? :)
标签: javascript html twitter-bootstrap validation required