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">

定义和用法

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

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》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具