TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Disable Right Click using JavaScript
Bhushan Singh
Oct 28
2014
Code
1.3
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
no_right.zip
Disable right click on your pages:
<script language=
"Javascript"
>
function
not_right_click() {
var
msg =
'not permission to right click'
;
if
(event.button == 2) {
alert(msg);
}
}
document.onmousedown=not_right_click;
</script>
disable right click using JavaScript
JavaScript