隐藏网页源代码
July 26th, 2007 4:30 PM 1 Comments Filed under: 资源分享 Feed for this Entry
今天看到一个网页,查看源代码时居然是空的。非常好奇。将这个网页下载到本地之后发现是通过一段JS脚本来实现这个效果的。现与大家分享:
XML/HTML代码
- <html>
- <head>
- <title>查看源文件为空-</title>
- <script>
- function clear() {
- Source=document.body.firstChild.data;
- document.open();
- document.close();
- document.body.innerHTML=Source;
- }
- </script>
- </head>
- <body onload=clear()>
- .....
- </body>
- </html>
TAGS: 代码
One Comment
January 27th, 2008 at 06:35 am
给你精彩网站
Leave a comment