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

查看所有标签

The Definitive Guide to MongoDB

The Definitive Guide to MongoDB

Peter Membrey、Wouter Thielen / Apress / 2010-08-26 / USD 44.99

MongoDB, a cross-platform NoSQL database, is the fastest-growing new database in the world. MongoDB provides a rich document orientated structure with dynamic queries that you’ll recognize from RDMBS ......一起来看看 《The Definitive Guide to MongoDB》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

SHA 加密
SHA 加密

SHA 加密工具

html转js在线工具
html转js在线工具

html转js在线工具