- <script language = "JavaScript" >
- function click() {
- if (event.button == 2) {
- alert('你好,右键已被禁止使用');
- }
- }
- document.onmousedown = click
- </script>
复制代码- <script language = "JavaScript" >
- function click(e) {
- if (document.all) {
- if (event.button == 2 || event.button == 3) {
- alert("欢迎光临知心朋友,有什么需要帮忙的话,请与站长联系!谢谢您的合作!!!");
- oncontextmenu = 'return false';
- }
- }
- if (document.layers) {
- if (e.which == 3) {
- oncontextmenu = 'return false';
- }
- }
- }
- if (document.layers) {
- document.captureEvents(Event.MOUSEDOWN);
- }
- document.onmousedown = click;
- document.oncontextmenu = new Function("return false;")
- </script>
复制代码- <script language = "JavaScript">
- 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;
- } </script>
复制代码 |
|