HTML DOM isContentEditableProperty

HTML 元素对象参考手册Element Object

Example

Check whether the <p> element is editable:

var x = document.getElementById("myP").isContentEditable;

xThe output result is:

true

Try it yourself »

Definition and Usage

The isContentEditable property returns whether the content of an element is editable.

This property is read-only.

Tip:To modify the editable state of an element, use thecontentEditableproperty.


Browser Support

The numbers in the table indicate the first browser version that supports this property.

Property
isContentEditable 11.0 5.5  3.0 3.2 10.6


Syntax

HTMLElementObject.isContentEditable

Technical Details

Return Value: Boolean value, returns true if the element content is editable, otherwise returns false.


Related Pages

HTML reference: HTML contenteditable Attribute


HTML 元素对象参考手册Element Object

Other Extensions