最新国产好看的视频,伊人天堂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)論

大安市| 克拉玛依市| 通江县| 韶关市| 濮阳县| 香河县| 达孜县| 本溪市| 泸定县| 永和县| 宿州市| 郁南县| 启东市| 牡丹江市| 耿马| 庐江县| 梁山县| 北流市| 元谋县| 平湖市| 兴化市| 衡阳市| 巍山| 兴义市| 龙胜| 宜兰市| 万山特区| 西昌市| 花垣县| 云阳县| 宁乡县| 张家港市| 汉沽区| 丹寨县| 苏州市| 宁夏| 凌海市| 华坪县| 光泽县| 武鸣县| 新巴尔虎左旗|