2015-02-11 111 views
1

在验证用户表单时,出现了默认的表单验证弹出这样的:避免违约的警告

enter image description here

这里是用代码的形式:

<form name="myForm"> 
    <input type="text" class="form-control" required 
           data-ng-model="entity.name" name="name" 
           placeholder="Pit Name"> 
</form> 

<button type="button" ng-click="save()" ng-disabled="myForm.$invalid">Save</button> 

有是一个保存按钮,点击上面弹出。如何禁用弹出?

回答

4

您可以使用novalidate

<form action="demo_form.asp" novalidate> 
    E-mail: <input type="email" name="user_email" /> 
    <input type="submit" /> 
</form>