Tutorial disable right click di halaman situs kita

Friday, May 15, 20150 comments

Insert kode di bawah ini di antara tag <head> </head>


<script language="javascript">
document.onmousedown=disableclick;
status="Right Click Disabled";
Function disableclick(event)
{
  if(event.button==2)
   {
     alert(status);
     return false;   
   }
}
</script>


Setelah itu insert code : oncontextmenu="return false" Di tag <body>
sehingga tag body menjadi tag body dibawah ini :

<body oncontextmenu="return false">



Contoh full script :

<script language="javascript">
document.onmousedown=disableclick;
status="Right Click Disabled";
Function disableclick(event)
{
  if(event.button==2)
   {
     alert(status);
     return false;   
   }
}
</script>

</head>

<body oncontextmenu="return false">
Share this article :

Post a Comment

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Tutorial Web Programming - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger