Home > Web Front-end > JS Tutorial > body text

Introduction to the functions and usage of document.designMode_javascript skills

WBOY
Release: 2016-05-16 19:07:46
Original
1214 people have browsed it

Set the document to design mode
To set the entire document to design mode, you can set the designMode property on the document object itself. The script will not run when the document is in design mode. It might seem like a good idea to have a button within the document to turn design mode on or off, but it has no effect. Once the user opens it, it will remain in design mode. The next time they click this button it will be selected instead of clicked, and they click it again and will be able to edit its value. This is why if you want to use design mode it is best to set the designMode attribute on the document in the frame or IFrame. The following example shows how to turn on design mode for a document in an IFrame:

Copy the code The code is as follows:




The value of the designMode attribute is always stored in uppercase, even if it Initially set in all lowercase. Please keep this in mind when testing its value. The default value of the designMode attribute is "Inherit".​
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template