We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

HTMLElement.isContentEditable

概述

 HTMLElement.isContentEditable 只读属性返回一个布尔值:如果当前元素的内容为可编辑状态,则返回 true,否则返回 false

语法

editable = element.isContentEditable

规范

规范版本 规范状态 备注
HTML Living Standard
HTMLElement.contenteditable
Living Standard No change from latest snapshot, HTML 5.1
HTML 5.1
HTMLElement.contenteditable
Recommendation Snapshot of HTML Living Standard, no change from HTML5
HTML5
HTMLElement.contenteditable
Recommendation Snapshot of  HTML Living Standard, initial definition.

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 4.0 (2) (Yes) (Yes) (Yes)
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) 4.0 (2) (Yes) (Yes) (Yes) (Yes)

相关链接

 

文档标签和贡献者

此页面的贡献者: AlexChao, teoli, mimzi_fahia, ziyunfei
最后编辑者: AlexChao,