JS解除右键限制方法一
javascript:(function () { function R(a) { ona = "on" + a; if (window.addEventListener){ window.addEventListener(a, function (e) { for (var n = e.originalTarget; n; n = n.parentNode){ n[ona] = null; } }, true); } window[ona] = null; document[ona] = null; if (document.body){ document.body[ona] = null; } } R("contextmenu"); R("click"); R("mousedown"); R("mouseup"); R("selectstart"); })() ;
使用方法:打开网页F12 ,把代码粘贴到控制台(Console),回车即可。
JS解除右键限制方法二
将以下代码添加进收藏夹,点击执行即可:
javascript:alert(document.onselectstart = document.onbeforecopy = document.oncontextmenu = document.onmousedown = document.onkeydown = function(){return true;});void(document.body.onmouseup=''); void(document.body.onselectstart=''); void(document.body.onmouseup=''); void(document.body.oncopy='');
加强的解除右键限制:
javascript:alert(document.onselectstart = document.onbeforecopy = document.oncontextmenu = document.onmousedown = document.onkeydown = function(){return true;});void(document.body.onmouseup=''); void(document.body.onselectstart=''); void(document.body.onmouseup=''); void(document.body.oncopy='');javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
本文转载自:精准像素:11px.cn ,感谢作者分享实用知识