日期:2014-03-15  浏览次数:20595 次

请将HTML源代码拷贝到下面表单中: <BR><TEXTAREA id=oSource onpropertychange=showhideJSTag(change(oSource.value)); name=oSource rows=10 cols=70></TEXTAREA>


      <BR>下面表单中是相应的JS代码.双击复制:(<INPUT id=ShowJSTag
      onclick=showhideJSTag(change(oSource.value)); type=checkbox value=yes
      name=ShowJSTag>是否加上JavaScript标签) <BR><TEXTAREA id=oResult ondblclick='this.select();oResult.createTextRange().execCommand("Copy")' title=双击复制 name=oResult rows=10 cols=70></TEXTAREA>
  <BR>
      <SCRIPT language=JavaScript>
 function change(oSourceString){
 return("document.writeln(\""+oSourceString.replace(/\\/g,"")");
 }

function  showhideJSTag(strjs)
{if(ShowJSTag.checked)
        oResult.value="<script language=javascript>\n<!--\n"+strjs+"\n//-->\n</"+"script>";
  else
    oResult.value=strjs; 
}

function opentestwin(str)                                    
{var testwin=window.open("test","_balnk","toolbar=no,location=no,directories=no,status=yes,menubar=yes,
scrollbars=yes,resizable=yes");                                    
  testwin.document.write(str);                                    
}  
 </SCRIPT>