复制代码代码如下::
<input type = "button" onclick = "CleanWord ();" value = "Wort 清理" />
CleanWord = function () {
var editbody = fckeditorapi.getInstance ("text"). EditordOcument.body;
var html = fcKeditorapi.getInstance ("text"). EditordOcument.body.InNeText;
für (var intloop = 0; intloop <editbody.all.Length; intloop ++) {
el = editbody.all [intloop];
El.RemoveAttribute ("ClassName", "", 0);
El.RemoveAttribute ("Stil", "", 0);
El.RemoveAttribute ("Schriftart", "", 0);
}
html = html.replace (/<o: p> <// o: p>/g, "");
html = html.replace (/o:/g, "");
html = html.replace (/<font>/g, "");
html = html.replace (/<font>/g, "");
html = html.replace (/<span>/g, "");
html = html.replace (/<span>/g, "");
html = html.replace (/<spanlang = en-us>/g, "");
html = html.replace (/<p>/g, "");
html = html.replace (/<// p>/g, "");
html = html.replace (/<// span>/g, "");
Fckeditorapi.getInstance ("text"). Editordocument.body.inNertext = html;
}