angularjs-表单与验证-表单控件的使用

来源:互联网 发布:各种网络协议的区别 编辑:程序博客网 时间:2024/06/03 03:01

表单控件:input/select/textarea

<!--h4的表单控件-->  <input type="text"/>  <input type="password"/>  <input type="radio"/>  <input type="checkbox"/>  <select name="s" id="s"></select>  <textarea name="ta" id="ta" cols="30" rows="10"></textarea>
  <!--h5新表单控件-->  <input type="email"/>  <input type="number"/>  <input type="url"/>  <input type="search"/>  <input type="range"/>  <input type="color"/>  <input type="month"/>  <input type="week"/>  <input type="date"/>  <input type="datetime"/>//仅适用于safari  <input type="datetime-local"/>  <input type="time"/>    <input type="submit"/>  <input type="reset"/>  <input type="button"/>  <input type="image"/>Radio:<input type="radio" ng-model="color2" value="red"/>红色  <input type="radio" ng-model="color2" ng-value="specialValue"/>绿色  <input type="radio" ng-model="color2" value="blue"/>蓝色Checkbox:值1:<input type="checkbox" ng-model="value1" />  值2:<input type="checkbox" ng-model="value2" ng-true-value="'Y'" ng-false-value="'N'"/>//'Y','N'是字符

Select:
结合ngOptions绑定模型快速生成选项列表
基本用法:
1.labelField for item in array
2.labelField group by groupField item in array

0 0
原创粉丝点击