Saturday, October 19, 2013

How to to disable right click using javascript?


Code to disable:
oncontextmenu="alert('right click is disable');return false;" 

now you may have doubt about placing this javascript code. This code should be in body as one of the attribute.

I think you can understand better if i give example.
<body oncontextmenu="alert('right click is disable');return false;"
>

i think now you understand. 

see , this will disabled only for usual internet users. You can not protect it from h@ckers. We can disable javascript simply using webtool bar add on

0 comments:

Post a Comment