Minggu, 15 Mei 2011

Javascript Anti Klik Kanan/window Bergetar

Javascript Anti Klik Kanan/window Bergetar, anti klik kanan ..di klik window bergetar

tambah gadget html javascript dan paste kode berikut
<script language="javascript">
<!-- Begin
function shake(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.resizeTo(250,150);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);}}}}

// End -->

PopUpURL = "jika anda ingin mengcopy tekan ctrl + c";

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;

if (isIE||isNN)
{
document.oncontextmenu=checkV;
}
else
{
document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
document.onmousedown=checkV;
}
function checkV(e)
{
if (isN4)
{
if (e.which==2||e.which==3)
{
dPUW=alert("jika anda ingin mengcopy tekan ctrl + c");
shake(2);
return false;
}
}
else
{
dPUW=alert(PopUpURL);
shake(2);
return false;
}
}
</script>

Tidak ada komentar:

Posting Komentar