Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Del photo ripinimo

Parašė sydow· 2008 Lie. 24 09:07:53
#3

Va scriptas kuris draudzia spausti desinis peles myktuka at img... Bet opera gal apeis sita skirpta.

<script language="JavaScript1.2">
var clickmessage="Negalima dešinio klavišo!"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script>




Redagavo sydow· 2008 Lie. 24 09:07:18