将源代码清空,这样别人就看不到源码了

破解方法在地址栏中输入

javascript:alert(document.documentElement.outerHTML);
<html>
<head>
<scriptlanguage="javascript">
functionclear(){
Source=document.body.firstChild.data;
document.open();
document.close();
document.title="看不到源代码";
document.body.innerHTML=Source;
}
</script>
</head>
<bodyonload=clear()>
111111111111111111111111111111</body>
</html>

你可能感兴趣的:(JavaScript,html)