首 页站长学院免费论文实用文书客户留言繁體中文
设为首页
加入收藏
联系我们
您当前的位置:爱上范文网 -> 站长学院 -> 网页制作 -> 网页特效 -> 文章内容 退出登录 用户管理
栏目导航
· HTML/CSS · 网页特效
· FrontPage · DreamWeaver
热门文章
· [组图] 2006:浏览器进入多元...
· 个人SMTP服务器的配...
· 不可忽视的BIOS参数...
· 趣话电脑病毒19年发...
· 什么是FTP及什么是F...
· [组图] Frontpage2000实务高...
· [图文] 网络协议X档案全集(...
· 局域网优化的六大秘...
· [组图] 新建Photoshop图像
· [组图] 用FrontPage 2000下...
相关文章
清除WORD冗余格式并粘贴
作者:无从考证  来源:小雨在线  发布时间:2005-8-14 18:57:23  发布人:admin

减小字体 增大字体

/ 清除WORD冗余格式并粘贴
function cleanAndPaste( html ) {
 // Remove all SPAN tags
 html = html.replace(/<\/?SPAN[^>]*>/gi, "" );
 // Remove Class attributes
 html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
 // Remove Style attributes
 html = html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3") ;
 // Remove Lang attributes
 html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
 // Remove XML elements and declarations
 html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
 // Remove Tags with XML namespace declarations: <o:p></o:p>
 html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
 // Replace the &nbsp;
 html = html.replace(/&nbsp;/, " " );
 // Transform <P> to <DIV>
 var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ; // Different because of a IE 5.0 error
 html = html.replace( re, "<div$2</div>" ) ;
 
 insertHTML( html ) ;
}

[] [返回上一页] [打 印] [收 藏]
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 管理登录
Copyright © 2002-2005 23fw.com. All Rights Reserved .