让别人查看不了你的HTML源代码,使用JS方式

HTML代码: 
<html><head><script>
function clear(){
Source=document.body.firstChild.data;
document.open();
document.close();
document.title="看不到源代码";
document.body.innerHTML=Source;
}</script></head>
<body onload=clear()>
<marquee>看得到源代码吗?
</marquee>
</body></html>
破解方法如下:javascript:alert(document.getElementsByTagName("HTML")[0].outerHTML)
posted on 2006-05-13 10:48  北极熊,我来了!  阅读(824)  评论(2编辑  收藏  举报