Sağ tuş yasaklama : iki tane stil...
Gönderilme zamanı: 17 Ağu 2007 [ 14:27 ]
birincisi sağ tuşa bastığınızda hiç bir uyarı mesajı çıkarmadan sadece sesiz bir şekilde sağ tuşu engelleyen script:
ikincisi ise sağ tuşa basıldığı zaman uyarı veren sağ tuş engelleme scripti:
yasaklama mesajını istediğiniz gibi değiştirebilirsiniz...
Kod: Tümünü seç
<SCRIPT language=JavaScript>curPage=1;
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}</SCRIPT>
ikincisi ise sağ tuşa basıldığı zaman uyarı veren sağ tuş engelleme scripti:
Kod: Tümünü seç
<script language=JavaScript>
<!--
//
//by begoodbe
//
var message="Üzgünüm ama bu özelliği kullanamazsınız...!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// -->
</script>
yasaklama mesajını istediğiniz gibi değiştirebilirsiniz...