|
- Come disabilitare il tasto destro - |
|
COSA SERVE PER QUESTO TUTORIAL |
Download
| Chiedi sul FORUM
|
Glossario |
Qualche conoscenza di base dell'HTML e di Javascript - Blocco Note o un
qualsiasi editor di codice HTML. |
Disabilitare il tasto destro su Firefox e Internet Explorer |
CODICE SORGENTE
<html>
<head>
<script type="text/javascript" language="javascript">
var messaggio = "Click destro disabilitato";
function DisabilitaIE4(){
if (event.button == 2){
alert(messaggio);
return false;
}
}
function DisabilitaNS4(e){
if (document.layers || document.getElementById && !document.all){
if (e.which == 2 || e.which == 3) {
alert(messaggio);
return false;
}
}
}
document.onload = function () {
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = DisabilitaNS4;
}
else if (document.all && !document.getElementById){
document.onmousedown = DisabilitaIE4;
}
}
document.oncontextmenu = function () {
alert(messaggio);
return false;
}
// -->
</script>
</head>
<body>
Testo...
</body>
</html>
|
<< INDIETRO |
by
VeNoM00 |
|