AngularJS ng-readonly 指令
AngularJS 教程
· 2019-04-02 05:58:27
AngularJS 实例
设置输入框为只读:
Readonly: <input type="checkbox" ng-model="all">
<br>
<input type="text" ng-readonly="all">
<br>
<input type="text" ng-readonly="all">
定义和用法
ng-readonly 指令用于设置表单域(input 或 textarea) 的 readonly 属性。
如果 ng-readonly 属性的表达式返回 true 则表单域为只读。
语法
<input ng-readonly="expression"></input>
<input> <textarea> 元素支持该指令。
参数值
| 值 | 描述 |
|---|---|
| expression | 表达式返回 true 则表单域为只读。 |
点击查看所有 AngularJS 教程 文章: https://www.codercto.com/courses/l/36.html
Design systems
Not all design systems are equally effective. Some can generate coherent user experiences, others produce confusing patchwork designs. Some inspire teams to contribute to them, others are neglected. S......一起来看看 《Design systems》 这本书的介绍吧!