|
 |
资料搜索 |
|
|
|
|
|
|
|
 |
相关文章 |
|
|
|
|
|
|
|
|
|
|
| [ 来源:小雨在线 | 作者:无从考证 | 时间:2005-8-14 18:57:23 | 浏览:人次 ] | |
|
/ 清除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 html = html.replace(/ /, " " ); // 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 ) ; }
|
|
|
|
|
|
特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。 |
|
|
|
|
|
栏目编辑: 设计风 |
责任编辑: 郁郁小蝎 |
|
|
原始作者: 无从考证 |
录入时间: 2005-8-14 18:57:23 |
|
|
信息来源: 小雨在线 |
投稿信箱: Edu#chinaz.com |
|
|
|
| |
|