上篇文章介绍了怎么禁用鼠标右键和控制台F12,那还有人可以按ctrl+c,怎么把这个也屏蔽呢
document.oncontextmenu = function(){ return false; } document.onkeydown = function(){ if (event.ctrlKey && window.event.keyCode==67){ return false; } } document.body.oncopy = function (){ return false; } document.onselectstart = function(){ //return false; }
通过这个js就达到目的啦