radio
{{modelName}}<div class="radio disIB">
<label class="i-checks">
<input type="radio" name="name" ng-model="modelName" value="1"> //因为单选 ng-model为同一个值,value是选中时候获取到的值
<i></i>11</label>
</div>
<div class="radio disIB">
<label class="i-checks">
<input type="radio" name="name" ng-model="modelName" value="2">
<i></i>22</label>
</div>checkbox
{{ckone}} ,{{cktwo}}<div class="checkbox checkbox-primary m-t-0">
<label>
<input type="checkbox" ng-model="ckone" ng-true-value="1" ng-false-value="2"> //多选时 model名不同 ng-true-value:选中的时候值 ng-false-value:取消选择的值
<span class="cr"><i class="cr-icon fa fa-check"></i></span>
</label>
</div>
<div class="checkbox checkbox-primary m-t-0">
<label>
<input type="checkbox" ng-model="cktwo" ng-true-value="3" ng-false-value="4">
<span class="cr"><i class="cr-icon fa fa-check"></i></span>
</label>
</div>select
{{selectData}}<select ng-model="selectData">
<option ng-repeat="item in dataList" ng-click="selectData = item.value">{{item.name}}</option>
</select>以上就是angular raido checkbox select取值的实例介绍的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号