您当前的位置:首页 > 网站建设 > javascript
| php | asp | css | H5 | javascript | Mysql | Dreamweaver | Delphi | 网站维护 | 帝国cms | React | 考试系统 | ajax | jQuery |

AngularJS ng-readonly 指令

51自学网 2023-01-16 20:24:31
  javascript

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 ng-paste 指令
AngularJS ng-repeat 指令
51自学网,即我要自学网,自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1