TextArea -使用CSS设置readonly属性为true
TextArea - set readonly attribute to true using CSS
我想使用css ONLY禁用某些类下的textarea。我不想用Javascript
<div class='commentArea'>
<textarea> I want do disable this using CSS </textarea>
</div>
如何将属性readonly设置为textarea ?或者有没有其他方法可以让textarea使用CSS不可编辑?
<div class='commentArea'>
<textarea readonly> I want do disable this using CSS </textarea>
</div>
你可以使用'pointer-events' css属性,如下所示。
.commentArea textarea{
pointer-events: none;
}
相关文章:
- AngularJS-使用'true'属性
- sails.js beforeCreate方法只接收required设置为true的模型属性
- 如何使函数将属性值从 FALSE 设置为 TRUE
- hasOwnProperty 在对照父对象属性进行检查时返回 true
- 为什么我的html节点保持类ng隐藏属性ng show=true
- 如何通过javarscript或jquery在数组中添加属性复选框(checked=true)
- AngularJS-为什么不;t替换:true使用templateUrl属性
- Image属性complete在实际渲染图像之前返回true
- 使用 javascript 更改 Gridview 文本框的可见属性 true 在下拉列表的选定索引更改事件上为 tru
- 为什么删除运算符返回 true,即使属性未从对象中删除
- 如何在骨干模型属性中设置布尔值true/false
- 如果返回true,则检查Javascript对象属性
- 使用jQuery将使用复选框的数据属性从false更改为true
- IE8 cloneNode(true)对象不支持此属性或方法
- 如果属性值为true,则按多个属性分组
- AngularJS ng重复筛选器:{visible:true}不遵循属性更改
- 即使没有显式指定属性,hasAttribute也应该返回true,但没有't
- 当javascript中checked属性设置为true时,复选框在UI中不会显示为checked
- 剑道分离器:如何改变“折叠”:false;拆分器属性为“可折叠”:true;点击按钮
- Rails link_to帮助器-提供onclick属性摆脱:remote =>true(动作作为HTML处理)