Sağ Tıklama Engellemek için: (Sağ Tuş Kiliti)
Kod:
<script language="Javascript1.2">
<script language=Javascript1.2>
if (window.Event) // Only Netscape will have the CAPITAL E.
********.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;
}
}
********.oncontextmenu = nocontextmenu; // for IE5+
********.onmousedown = norightclick; // for all others
</script>
Metin Seçmeyi Engellemek için: (Metin Seçme Engeli)
Kod:
<script type="text/javascript">
function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
target.style.MozUserSelect="none"
else //All other route (ie: Opera)
target.onmousedown=function(){return false}
target.style.cursor = "default"
}
</script>
<script type="text/javascript">
disableSelection(document.body)
</script>
0 Comments:
Yorum Gönder