最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

js清理Word格式示例代碼

 更新時(shí)間:2014年02月13日 12:08:08   作者:  
這篇文章主要介紹了使用JS清理Word格式的方法,需要的朋友可以參考下
復(fù)制代碼 代碼如下:

<input type="button" onclick="cleanWord();" value="Word清理" />

cleanWord = function(){
var editBody = FCKeditorAPI.GetInstance("text").EditorDocument.body;
var html = FCKeditorAPI.GetInstance("text").EditorDocument.body.innerText;
for(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>&nbsp;<\/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;
}

相關(guān)文章

最新評(píng)論

陵川县| 始兴县| 同德县| 腾冲县| 晋州市| 酉阳| 三门峡市| 萨嘎县| 韶山市| 炎陵县| 淮北市| 密山市| 政和县| 山阴县| 平遥县| 肇东市| 昌都县| 萨迦县| 海丰县| 兰州市| 罗田县| 青浦区| 南宁市| 柳河县| 察隅县| 仲巴县| 孟连| 福贡县| 元朗区| 兰坪| 海安县| 海淀区| 韩城市| 镇赉县| 苗栗县| 新兴县| 抚宁县| 百色市| 滨海县| 石楼县| 蓬安县|