防止查看网页源代码
?這招算是目前網上公布的防止查看源代碼的方法中最好的了,當然了,要看還是辦法的,比如在地址欄中輸
入"javascript:alert(document.documentElement.outerHTML);"。
但好像測試了幾下,簡單的沒多少代碼的還行,對于JS較多的,就不行了。
?
<html>
?
<head>
?
<script language="javascript">
?
function clear(){
?
Source=document.body.firstChild.data;
?
document.open();
?
document.close();
?
document.title="看不到源代碼";
?
document.body.innerHTML=Source;
?
}
?
</script>
?
</head>
?
<body οnlοad=clear()>
?
<!--
?
<a href="http://www.zgsj.com">中國數據</a>可惜你看不到!
?
-->
?
</body>
?
</html>
?
轉載于:https://blog.51cto.com/lincolnxhz/717721
總結
- 上一篇: 索引图像的那些事啊
- 下一篇: WINDOWS与LINUX下的DNS轮询