Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to disable mouse right click in html page

document.addEventListener('contextmenu', event => event.preventDefault());

// ⇓ Test it (fiddle) ⇓
Comment

disable mouse right click javascript

document.oncontextmenu = document.body.oncontextmenu = function() {return false;}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript oncontextmenu 
Javascript :: express serve static files 
Javascript :: go to nextelementsibling javascript 
Javascript :: has not class jquery 
Javascript :: brackets not autocompleting in js file in vscode 
Javascript :: discord.js bot activity 
Javascript :: javascript scroll down 
Javascript :: onchange text input react native 
Javascript :: ng serve local network 
Javascript :: js json upload 
Javascript :: type float loopback model 
Javascript :: cloudinary download url 
Javascript :: cypress scroll bottom 
Javascript :: style after javascript 
Javascript :: regex only letters not spaces 
Javascript :: ffmpeg thumbnail generator 
Javascript :: regex all starting with 
Javascript :: string to kebab case 
Javascript :: javascript shuffle array 
Javascript :: angular command to create interceptor 
Javascript :: ngrok angular 8 
Javascript :: angular string to number 
Javascript :: req.body empty mongodb 
Javascript :: javascript get line number of error 
Javascript :: node crypto hmac sha256 
Javascript :: javascript get all keys of object 
Javascript :: hnazmul 
Javascript :: datatable without pagination 
Javascript :: jquery set value by id 
Javascript :: get filename from url js 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =