> For the complete documentation index, see [llms.txt](https://chanshiyu.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chanshiyu.gitbook.io/blog/zhi-han/04-document.designmode.md).

# 04 Document.designMode

document.designMode 控制整个文档是否可编辑。有效值为 "on" 和 "off" 。

```javascript
const mode = document.designMode
document.designMode = 'on' || 'off'
```

设置为 "on" 则整个文档设置为可编辑模式。
