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://codercto.com/courses/l/36.html

查看所有标签

The Apache Modules Book

The Apache Modules Book

Nick Kew / Prentice Hall PTR / 2007-02-05 / USD 54.99

"Do you learn best by example and experimentation? This book is ideal. Have your favorite editor and compiler ready-you'll encounter example code you'll want to try right away. You've picked the right......一起来看看 《The Apache Modules Book》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

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

在线压缩/解压 CSS 代码