在HTML5中新增加了一个contenteditable属性,中文理解就是让文本处于可编辑状态。
目前所有的主流浏览器都支持contenteditable属性,contenteditable属性指定元素内容是否可编辑,此元素可继承。
<p contenteditable="true"></p>
contenteditable属性有两个值:
- true:指定元素是可编辑的
- false:指定元素是不可编辑的
在HTML5中新增加了一个contenteditable属性,中文理解就是让文本处于可编辑状态。
目前所有的主流浏览器都支持contenteditable属性,contenteditable属性指定元素内容是否可编辑,此元素可继承。
<p contenteditable="true"></p>
contenteditable属性有两个值: