How to to disable right click using javascript?

I am posting this article as per the one of my user request. It is easy to disable right click in a website 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 hackers. We can disable javascript simply using webtool bar add on