<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<HTML>
<HEAD>
<TITLE> 清除html的垃圾代码</TITLE>
<script language=”javascript”>
    <!–
    function execRE(re,rp,content) {
        oReg=new RegExp(re,”ig”);
        r = content.replace(oReg, rp);
        return r;
    }
    function codeSweeper(content, mode)
    {
        switch(mode)
        {
            case “allhtml”:
                    // 清除所有html标签
                    content = execRE(“</?[^>]*>”, “”, content);
                    break;
                case “word”:
                    // 清除所有的xml标签
                    content = execRE(“<\\?xml[^>]*>”, “”, content);
                    // 清除所有的带名称空间的标签
                    content = execRE(“<\/?[a-z]+:[^>]*>”, “”, content);               
                    // 清除所有的class属性   
                    content = execRE(“(<[^>]+) class=[^ |^>]*([^>]*>)”, “$1 $2″, content);           
                    // 清除所有的style属性
                    content = execRE(“(<[^>]+) style=\”[^\"]*\”([^>]*>)”, “$1 $2″, content);
                    // 清除所有空的span标签
                    content = execRE(“<span[^>]*><\/span[^>]*>”, “”, content);                    
                    // 清除所有的多余span标签
                    content = execRE(“<span><span>”,”<span>”, content);                            
                    content = execRE(“</span></span>”,”</span>”, content);
                    // 清除所有的多余空白
                    content = execRE(“[ ]*>”, “>”, content);           
                    break;
                case “css”:
                    // 清除所有的class属性   
                    content = execRE(“(<[^>]+) class=[^ |^>]*([^>]*>)”, “$1 $2″, content);           
                    // 清除所有的style属性
                    content = execRE(“(<[^>]+) style=\”[^\"]*\”([^>]*>)”, “$1 $2″, content);
                    break;
                case “font”:
                    content = execRE(“</?font[^>]*>”, “”, content);
                    break;
                case “span”:
                    content = execRE(“</?span[^>]*>”,”",content);
                    break; 
                case “script”:
                    break; 
        }
        return content;
    }

    function onPaste() {
    }

    function PasteWordContent() {
        var oTextRange = editor.document.body.createTextRange() ;
        oTextRange.execCommand(“Paste”) ;

        CleanCode();
    }

    function Init()
    {
        editor.document.write(Code.value);
        editor.document.designMode=”On”;
        editor.document.onpaste = onPaste;
    }

    function getContent()
    {
        return editor.document.body.innerHTML;
    }

    function setContent(content)
    {
        editor.document.body.innerHTML = content;
        ViewCode();
    }

    function CleanCode()
    {
        setContent(codeSweeper(getContent(), cleanMode.options[cleanMode.selectedIndex].value));
    }

    function ViewCode()
    {
        Code.value = getContent();
    }

    // –>
</script>
</HEAD>

<BODY onload=”Init()”>

清除模式<select name=”cleanMode”>
    <option value=”allhtml”>所有html标签</option>
    <option value=”word” selected>word代码</option>
    <option value=”css”>样式表</option>
    <option value=”font”>font标签</option>
    <option value=”span”>span标签</option>
    <option value=”script”>不安全的script脚本</option>
</select>
<input type=”button” onclick=’CleanCode()’ value=”清除”/>
<input type=”button” onclick=’PasteWordContent()’ value=”粘贴代码(根据选择的模式自动清除垃圾代码)”/><br />
编辑器:<iframe  id=”editor”></IFRAME><p></p>
<textarea id=”Code” rows=”20″ cols=”50″>
<DIV align=center>
<TABLE class=MsoNormalTable style=”BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN: auto auto auto 14.4pt; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext” cellSpacing=0 cellPadding=0 border=1>
<TBODY>
<TR style=”page-break-inside: avoid”>
<TD style=”BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 495pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt” vAlign=top width=660 colSpan=2>
<H2 style=”MARGIN: 0cm 0cm 0pt”><SPAN lang=EN-US><FONT size=3>Page top</FONT></SPAN></H2></TD></TR>
<TR style=”HEIGHT: 193.3pt; page-break-inside: avoid”>
<TD style=”BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 126pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 193.3pt; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt” vAlign=top width=168>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt”><SPAN style=”FONT-SIZE: 12pt; FONT-FAMILY: 黑体; mso-ascii-font-family: ‘Times New Roman’”>学员手册</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 12pt; mso-fareast-font-family: 黑体”><?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p></SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt”><SPAN style=”FONT-SIZE: 12pt; FONT-FAMILY: 黑体; mso-ascii-font-family: ‘Times New Roman’”>个人信息查询</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 12pt; mso-fareast-font-family: 黑体”><o:p></o:p></SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt”><SPAN style=”FONT-SIZE: 12pt; FONT-FAMILY: 黑体; mso-ascii-font-family: ‘Times New Roman’”>清单教室</SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0″><B><SPAN style=”FONT-FAMILY: 华文中宋; mso-ascii-font-family: ‘Times New Roman’; mso-hansi-font-family: ‘Times New Roman’”>理论学习篇</SPAN></B><B><SPAN lang=EN-US style=”mso-fareast-font-family: 华文中宋”><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0″><B><SPAN style=”FONT-FAMILY: 华文中宋; mso-ascii-font-family: ‘Times New Roman’; mso-hansi-font-family: ‘Times New Roman’”>实务学习篇</SPAN></B><B><SPAN lang=EN-US style=”mso-fareast-font-family: 华文中宋”><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36.15pt; mso-char-indent-count: 4.0″><B><SPAN style=”FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: ‘Times New Roman’; mso-hansi-font-family: ‘Times New Roman’”>招投标流程简介</SPAN></B><B><SPAN lang=EN-US style=”FONT-SIZE: 9pt; COLOR: blue; mso-bidi-font-size: 12.0pt”><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36pt; mso-char-indent-count: 4.0″><SPAN style=”FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: ‘Times New Roman’; mso-hansi-font-family: ‘Times New Roman’”>完整工程实例详解</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 9pt; mso-bidi-font-size: 12.0pt”><o:p></o:p></SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36pt; mso-char-indent-count: 4.0″><SPAN style=”FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: ‘Times New Roman’; mso-hansi-font-family: ‘Times New Roman’”>实务重难点分析</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 9pt; mso-bidi-font-size: 12.0pt”><o:p></o:p></SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt”><SPAN style=”FONT-SIZE: 12pt; FONT-FAMILY: 黑体; mso-ascii-font-family: ‘Times New Roman’”>答疑室</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 12pt; mso-fareast-font-family: 黑体”><o:p></o:p></SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt”><SPAN style=”FONT-SIZE: 12pt; FONT-FAMILY: 黑体; mso-ascii-font-family: ‘Times New Roman’”>资源库</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 12pt; mso-fareast-font-family: 黑体”><o:p></o:p></SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt”><SPAN style=”FONT-SIZE: 12pt; FONT-FAMILY: 黑体; mso-ascii-font-family: ‘Times New Roman’”>评测中心</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 12pt; mso-fareast-font-family: 黑体”><o:p></o:p></SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt”><SPAN style=”FONT-SIZE: 12pt; FONT-FAMILY: 黑体; mso-ascii-font-family: ‘Times New Roman’”>实战寻宝</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 12pt; COLOR: green; mso-fareast-font-family: 黑体”><o:p></o:p></SPAN></P></TD>
<TD style=”BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #d4d0c8; WIDTH: 369pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 193.3pt; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt” vAlign=top width=492>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center” align=center><SPAN style=”FONT-SIZE: 18pt; COLOR: blue; FONT-FAMILY: 华文新魏; mso-bidi-font-size: 15.0pt; mso-font-kerning: 7.5pt; mso-ascii-font-family: ‘Times New Roman’”>招投标流程简介</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 18pt; COLOR: blue; mso-bidi-font-size: 15.0pt; mso-fareast-font-family: 华文新魏; mso-font-kerning: 7.5pt”><o:p></o:p></SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 30pt; mso-char-indent-count: 2.0″><SPAN style=”FONT-SIZE: 15pt; COLOR: black; FONT-FAMILY: 楷体_GB2312; mso-font-kerning: 7.5pt; mso-ascii-font-family: ‘Times New Roman’”>本课程通过对清单模式下招标、投标业务流程的简单描述与说明,向您介绍招投标过程中各个步骤与环节的操作办法,从而加深您对“清单规范”的理解,帮助您熟悉招投标的业务流程。</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 15pt; COLOR: black; mso-fareast-font-family: 楷体_GB2312; mso-font-kerning: 7.5pt”><o:p></o:p></SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; TEXT-ALIGN: right; mso-char-indent-count: 2.0″ align=right><SPAN style=”FONT-SIZE: 12pt; COLOR: green; FONT-FAMILY: 黑体; mso-bidi-font-size: 15.0pt; mso-font-kerning: 7.5pt; mso-ascii-font-family: ‘Times New Roman’”>开始学习</SPAN><SPAN lang=EN-US style=”FONT-SIZE: 12pt; COLOR: green; mso-fareast-font-family: 黑体”><o:p></o:p></SPAN></P></TD></TR>
<TR style=”page-break-inside: avoid; mso-yfti-lastrow: yes”>
<TD style=”BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 495pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt” vAlign=top width=660 colSpan=2>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center” align=center><B style=”mso-bidi-font-weight: normal”><SPAN lang=EN-US style=”FONT-SIZE: 12pt”>Page bottom</SPAN></B></P></TD></TR></TBODY></TABLE></DIV>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt”><SPAN lang=EN-US><o:p> </o:p></SPAN></P>
<P class=MsoNormal style=”MARGIN: 0cm 0cm 0pt”><SPAN lang=EN-US><o:p> </o:p></SPAN></P>
</textarea>
<input type=”button” onclick=’ViewCode()’ value=”看代码”/>
</BODY>
</HTML>

 


1条评论

发表评论

评论也有版权!