位置:首頁 > 軟件操作教程 > 編程開發(fā) > HTML > 問題詳情

html特效代碼 48、在網(wǎng)頁的Head部分加入如下代碼

提問人:劉團圓發(fā)布時間:2020-11-02

在網(wǎng)頁的Head部分加入如下代碼,這段代碼的主要功能是屏蔽PrintScreen鍵,不斷清空剪貼版,防止圖片被用文件——另存為菜單另存。

<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>

繼續(xù)查找其他問題的答案?

相關(guān)視頻回答
回復(0)
返回頂部