English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM designMode Attribute

HTML DOM Document Object

designModeThe property specifies whether to edit the entire document.

Syntax:

Return the designMode property:

document.designMode

Set the designMode property:

document.designMode = on|off
document.designMode = "on";
Test and see‹/›

Please refer to HTML contenteditableProperty

Browser Compatibility

All browsers fully support the designMode property:

Property
designModeYesYesYesYesYes

Appropriate Value

ValueDescription
offThe document is not editable (default setting)
onThe document is editable

Technical Details

Default Value:off
Return Value:string (onoroff),specifies whether the document is editable
DOM Version:DOM Level1

More Examples

Return the designMode of the document:

var mode = document.designMode;
Test and see‹/›

HTML DOM Document Object