<html>
<head>
<script>
function clear() {
Source=document.body.firstChild.data;
document.open();
document.close();
document.body.innerHTML=Source;
}
</script>
</head>
<body onload=clear()>
现在在里面填充代码 你会发现无法查看到源代码
</body>
</html>
<head>
<script>
function clear() {
Source=document.body.firstChild.data;
document.open();
document.close();
document.body.innerHTML=Source;
}
</script>
</head>
<body onload=clear()>
现在在里面填充代码 你会发现无法查看到源代码
</body>
</html>
本文介绍了一种通过JavaScript在页面加载时清除可见源代码的方法,使得直接查看网页源代码变得困难。此技巧对于保护网页实现细节具有一定作用。
1789

被折叠的 条评论
为什么被折叠?



