-
How to disable the "Right Click" function of the mouse in web page?
How to disable the "Right Click" function of the mouse in web page?
Using Javascript? Any suggestion code?
-
Re: How to disable the "Right Click" function of the mouse in web page?
"shatin88" <shatin88@yahoo.com> wrote:
>
>How to disable the "Right Click" function of the mouse in web page?
>Using Javascript? Any suggestion code?
I dug this code up a couple of days ago. Hope it helps.
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
-
Re: How to disable the "Right Click" function of the mouse in web page?
Your code is work!! Thks a lot!!
"sodajerk" <whatsamattau@bigfoot.com> wrote:
>
>"shatin88" <shatin88@yahoo.com> wrote:
>>
>>How to disable the "Right Click" function of the mouse in web page?
>>Using Javascript? Any suggestion code?
>
>I dug this code up a couple of days ago. Hope it helps.
>
>document.oncontextmenu = function(){return false}
>if(document.layers) {
> window.captureEvents(Event.MOUSEDOWN);
> window.onmousedown = function(e){
> if(e.target==document)return false;
> }
>}
>else {
> document.onmousedown = function(){return false}
>}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|