AngularJS ng-checked 指令

AngularJS 教程 · 2019-04-01 12:57:41

AngularJS 实例

选择一个或选择所有选项:

<body ng-app="">
<p>My:</p>
<input type="checkbox" ng-model="all"> Check all<br><br>

<input type="checkbox" ng-checked="all">Volvo<br>
<input type="checkbox" ng-checked="all">Ford<br>
<input type="checkbox" ng-checked="all">Mercedes
</body>

定义和用法

ng-checked 指令用于设置复选框(checkbox)或单选按钮(radio)的 checked 属性。

如果 ng-checked 属性返回 true,复选框(checkbox)或单选按钮(radio)将会被选中。

语法

<input type="checkbox|radio" ng-checked="expression"></input>

type 为 checkbox 或 radio 的 <input> 元素支持。

参数值

描述
expression 如果返回 true,将会选中元素选项。

点击查看所有 AngularJS 教程 文章: https://codercto.com/courses/l/36.html

查看所有标签

Numerical Methods and Methods of Approximation in Science and En

Numerical Methods and Methods of Approximation in Science and En

Karan Surana / CRC Press / 2018-10-31

ABOUT THIS BOOK Numerical Methods and Methods of Approximation in Science and Engineering prepares students and other readers for advanced studies involving applied numerical and computational anal......一起来看看 《Numerical Methods and Methods of Approximation in Science and En》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

MD5 加密
MD5 加密

MD5 加密工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器