[英]Bootstrap form-group
我从引导框架中获得了一个表单组内的两个输入。 我的问题是,如果名字给错误,第二个名字也会给与名字相同的错误,那不是我想要的,我该如何避免这个问题?
<form id="containerForm" class="form-horizontal">
<div class="form-group">
<label class="col-xs-3 control-label">First name</label>
<div class="col-xs-4">
<input required type="text" class="form-control" name="firstName" placeholder="First name" />
</div>
<label class="col-xs-3 control-label">Last name</label>
<div class="col-xs-4">
<input required type="text" class="form-control" name="lastName" placeholder="Last name" />
</div>
</div>
</form>
这不是一个完整的答案,但是Stackoverflow.com上有更多关于此项目的文章。
无论如何,我还是建议您使用服务器端验证
But just to get you going see this example:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.