复制代码代码如下:
<อินพุต type = "ปุ่ม" onclick = "cleanword ();" value = "Word 清理" />
cleanword = function () {
var editbody = fckeditorapi.getInstance ("ข้อความ"). editordocument.body;
var html = fckeditorapi.getInstance ("ข้อความ"). editordocument.body.innertext;
สำหรับ (var intloop = 0; intloop <editbody.all.length; intloop ++) {
EL = editbody.All [intloop];
El.RemoveAttribute ("classname", "", 0);
El.Removeattribute ("Style", "", 0);
El.Removeattribute ("Font", "", 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;
-