DesignMode 跟 contentEditable 這個兩個屬性一般常用在 iframe中,在富文本編輯器之類中反光發熱。
var ifr = document.getElementById("editor"); // iframe 的id 位editor
var doc = ifr.contentDocument || ifr.contentWindow.document; // W3C || IE 方式獲取iframe的文檔對象
doc.designMode= "on";
doc.contentEditable= true;