No Right-Click & Co scripts
Last Updated: Mar 29 2002 14:51, Started by
Courage
, Mar 06 2002 23:48
·
0
#1
Posted 06 March 2002 - 23:48
Sunt mai multe variante ale acestui script, le voi adauga pe masura ce le voi gasi.
puneti aceste scripturi intre ... Varianta 1: <script LANGUAGE="javascript"> // you can get more scripts from [url="http://www.softnews.ro/forum"]http://www.softnews.ro/forum[/url] - WEB Design Area function click() { if (event.button==2) { alert('DO NOT STEAL!'); } } document.onmousedown=click // --> </script> Varianta 2: - nu apare deloc meniu contextual !!! <script> // you can get more scripts from [url="http://www.softnews.ro/forum"]http://www.softnews.ro/forum[/url] - WEB Design Area if (window.Event) // Only Netscape will have the CAPITAL E. document.captureEvents(Event.MOUSEUP); // catch the mouse up event function nocontextmenu() // this function only applies to IE4, ignored otherwise. { event.cancelBubble = true event.returnValue = false; return false; } function norightclick(e) // This function is used by all others { if (window.Event) // again, IE or NAV? { if (e.which == 2 || e.which == 3) return false; } else if (event.button == 2 || event.button == 3) { event.cancelBubble = true event.returnValue = false; return false; } } document.oncontextmenu = nocontextmenu; // for IE5+ document.onmousedown = norightclick; // for all others </script> Varianta 3: - blocheaza right-click si tastele Ctrl si Shift ! <script language="javascript"> // you can get more scripts from [url="http://www.softnews.ro/forum"]http://www.softnews.ro/forum[/url] - WEB Design Area function right(e){if(navigator.appName=='Netscape'&&(e.which==3||e.which==2)) return false;else if(navigator.appName=='Microsoft Internet Explorer'&&(event.button==2||event.button==3)){alert("Sorry, that function is disabled");return false;}return true;}function keypressed(){alert("Sorry, that function is disabled");}document.onmousedown=right;document.onkeydown=keypressed; </script> |
#2
Posted 28 March 2002 - 12:52
Acesta scoate definitiv comanda Click dreapta Se va introduce intre liniile <body> si |