防止被Print Screen
<script language="javascript">
<!--
function testclip(){
try {
if(clipboardData.getData("Text")||clipboardData.getData("HTML")||clipboardData.getData("URL"))
{
null;
}
}
catch(e){
clipboardData.setData("Text","")
}
setTimeout("testclip()",500)
}
testclip();
//-->
</script>
以上代码都加在</head>前面
<script language="javascript">
<!--
function testclip(){
try {
if(clipboardData.getData("Text")||clipboardData.getData("HTML")||clipboardData.getData("URL"))
{
null;
}
}
catch(e){
clipboardData.setData("Text","")
}
setTimeout("testclip()",500)
}
testclip();
//-->
</script>
以上代码都加在</head>前面

本文提供了一段JavaScript代码,用于防止用户使用PrintScreen键截取网页内容。通过定时检查剪贴板数据并清空其内容的方式,达到保护网页信息安全的目的。
7229

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



