XML/HTML Code复制内容到剪贴板
  1. <html>  
  2. <head>  
  3. <script language="javascript">  
  4. function clear(){   
  5.  Source=document.body.firstChild.data;   
  6.  document.open();   
  7.  document.close();   
  8.  document.title="看不到源代码";   
  9.  document.body.innerHTML=Source;   
  10. }   
  11. </script>  
  12. </head>  
  13. <body onload=clear()>  
  14. <!--   
  15. 这招算是目前网上公布的防止查看源代码的方法中最好的了,当然了,要看还是办法的,比如在地址栏中输入<br>  
  16. javascript:alert(document.documentElement.outerHTML);    
  17. -->  
  18. </body>  
  19. </html>