js & document.designMode
js & document.designMode
js 一键开启页面编辑模式
var mode = document.designMode;
document.designMode = value;
https://developer.mozilla.org/en-US/docs/Web/API/Document/designMode
document.designMode
document.designMode;
// "off"
document.designMode = "on";
// "on"
document.designMode;
// "on"
https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand
HTMLElement.contentEditable
editable = element.contentEditable
element.contentEditable = 'true'
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/contentEditable
demo
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/14220975.html
未经授权禁止转载,违者必究!