当前位置: 首页 > 工具软件 > openWYSIWYG > 使用案例 >

wysiwyg html 编辑器,可视化HTML编辑器 openWYSIWYG如何取值?

吕高雅
2023-12-01

/* ---------------------------------------------------------------------- *\

Arguments   : n   - The editor identifier (the textarea's ID)

\* ---------------------------------------------------------------------- */

function getInnerHTML(n) {

var getDocument = document.getElementById("wysiwyg" + n).contentWindow.document;

var browserName = navigator.appName;

var iHTML = "";

// View Source for IE

if (browserName == "Microsoft Internet Explorer") {

iHTML = getDocument.body.innerHTML;

// View Source for Mozilla/Netscape

}else {

iHTML = document.createTextNode(getDocument.body.innerHTML);

}

return iHTML;

}

 类似资料: