0

I want to disable right click in my web page, JavaScript's provide that, but i need to do that without using any scripting Language.

6
  • You can't. But why disable right click? Commented Feb 25, 2016 at 13:13
  • Why can't you use a scripting language? Commented Feb 25, 2016 at 13:14
  • I'm trying some new features in HTML ... Commented Feb 25, 2016 at 13:21
  • If i use scripting Language, How can i do that? and which is best? Commented Feb 25, 2016 at 13:22
  • @MadhankumarBK Sorry. Without JS, you can't. Commented Feb 25, 2016 at 13:22

2 Answers 2

4
<body oncontextmenu="return false">

but actually it is javascript: http://www.w3schools.com/jsref/event_oncontextmenu.asp

Sign up to request clarification or add additional context in comments.

Comments

0

document.addEventListener("contextmenu", (e) => e.preventDefault(), false)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.