Is "myP" element editable:
let answer = document.getElementById("myP").isContentEditable;
Try it Yourself »
The isContentEditable
property returns true
if the content of an element is editable.
The isContentEditable
property is read-only.
You can use the contentEditable property to change the editable state of an element.
element.isContentEditable
Type | Description |
Boolean | true if the content of an element is editable, otherwise false . |
element.isContentEditable()
is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!