您好,登錄后才能下訂單哦!
屏蔽f12審查
<script> document.onkeydown = function () { if (window.event && window.event.keyCode == 123) { alert("F12被禁用"); event.keyCode = 0; event.returnValue = false; } if (window.event && window.event.keyCode == 13) { window.event.keyCode = 505; } if (window.event && window.event.keyCode == 8) { alert(str + "\n請使用Del鍵進行字符的刪除操作!"); window.event.returnValue = false; } } </script>
屏蔽右鍵菜單
<script> document.oncontextmenu = function (event) { if (window.event) { event = window.event; } try { var the = event.srcElement; if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) { return false; } return true; } catch (e) { return false; } } </script>
屏蔽粘貼
<script> document.onpaste = function (event) { if (window.event) { event = window.event; } try { var the = event.srcElement; if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) { return false; } return true; } catch (e) { return false; } } </script>
屏蔽復制
<script> document.oncopy = function (event) { if (window.event) { event = window.event; } try { var the = event.srcElement; if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) { return false; } return true; } catch (e) { return false; } } </script>
屏蔽剪切
<script> document.oncut = function (event) { if (window.event) { event = window.event; } try { var the = event.srcElement; if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) { return false; } return true; } catch (e) { return false; } }<script>
屏蔽選中
<script> document.onselectstart = function (event) { if (window.event) { event = window.event; } try { var the = event.srcElement; if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) { return false; } return true; } catch (e) { return false; } } </script>
這些代碼獲取你在某些特殊開發的場合你可以用到,但是你也只能用這個騙一下小白,哈哈! 我收藏的分享出來給大家!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。