angular.js - angularjs怎么校验带checkbox的表单?
为情所困
为情所困 2017-05-15 16:51:31
0
1
453

html如下(举例而用别介意样式):

<input type="email" name="email"> <textarea placeholder="介绍您的个人情况"></textarea> <input type="checkbox" ng-model="m1">同意试用条款 <button>提交申请</button>

刚初学angular,请教一下各位前辈,使用angularjs怎么样才能实现email、textarea都不为空,checkbox也被勾选的情况,button才能够被点击呢?

为情所困
为情所困

reply all(1)
Ty80

Suppose the ng-model settings of the three input textareas are m1 m2 m3, and then add ng-disabled='!m1||!m2||!m3' on the button

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!