<!--把如下代碼加入<body>區域中 --> <SCRIPT LANGUAGE="JavaScript"> <!--Hide Javascript from Java-Impaired Browsers var ls=""; var dq='"'; var sq="'"; var rr="\r"; function JSPars(){ ls=document.isn.txt.value; if (ls==""){ alert("I'm sorry. I don't find any text pasted into the text window"); } else{ htmlPar(); } } function HtmlPar(){ document.isn.txt.value="Working......."; pos=ls.indexOf(dq); pos1=ls.indexOf(sq); if ((pos>-1)&&(pos1>-1)){ reWrt(); } if (pos>-1){ qt=sq; } else{ qt=dq; } while (ls.indexOf(rr)>-1){ lc=ls.indexOf(rr); ls=ls.substring(0,lc)+" "+ls.substring(lc+1,ls.length); } nls="<SCRIPT LANGUAGE="+qt+"Javascript"+qt+">"+rr +"<!-- Hide from JavaScript-Impaired Browsers"+rr +" document.write("+qt+ls.substring(0,36)+qt; ls=ls.substring(36,ls.length); lsl=ls.length pp=50; if (pp>lsl) { pp=lsl; } while (lsl>0){ nls+="\r +"+qt+ls.substring(0,pp)+qt; ls=ls.substring(pp,lsl); lsl=ls.length; if (pp>lsl){ pp=lsl; } } nls+=");"+rr+"// End Hiding -->"+rr+"</SC" +"RIPT>"; document.isn.txt.value=nls+rr+"<!-- Size: "+nls.length +" bytes --> "+rr; } function reWrt(){ pos=-1; while (ls.indexOf(dq)>-1){ lc=ls.indexOf(dq); ls=ls.substring(0,lc)+sq+ls.substring(lc+1,ls.length); } } function iA(){ this.length=iA.arguments.length; for (var i=0;i<this.length;i++){ this[i]=iA.arguments[i]; } } // End Hiding --> </SCRIPT> <FORM NAME="isn"> <TABLE BORDER=0 WIDTH=486> <TR><TD> <DIV ALIGN="center"> <INPUT TYPE="button" NAME="but" VALUE=" Submit When Your Html Has Been Pasted Below " onClick="JSPars()"> </DIV> <P> <TEXTAREA NAME="txt" ROWS=20 COLS=75> </TEXTAREA>