Home > Web Front-end > JS Tutorial > Example introduction of angular raido checkbox select value

Example introduction of angular raido checkbox select value

零下一度
Release: 2017-06-30 10:17:30
Original
1537 people have browsed it

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>
Copy after login

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>
Copy after login

 select

{{selectData}}<select ng-model="selectData">
    <option ng-repeat="item in dataList" ng-click="selectData = item.value">{{item.name}}</option>
</select>
Copy after login

The above is the detailed content of Example introduction of angular raido checkbox select value. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template