JavaScrip防止代码被阅读

wangnan0 2012-06-02

参考:http://www.mscto.com/JavaScript/11582904.html

<html>

<head>

<scriptlanguage="javascript">

functionclear(){

Source=document.body.firstChild.data;

document.open();

document.close();

document.title="看不到源代码";

document.body.innerHTML=Source;

}

</script>

</head>

<bodyonload=clear()>

</body>

</html>

破解办法在地址栏中输入javascript:alert(document.documentElement.outerHTML);

相关推荐