Home > Web Front-end > JS Tutorial > jQuery simply implements disabling the right-click menu_jquery

jQuery simply implements disabling the right-click menu_jquery

WBOY
Release: 2016-05-16 16:10:18
Original
1051 people have browsed it

The code is very simple, no more nonsense here, just go to the code:

Copy code The code is as follows:

$(document).ready(function(){
$(document).bind("contextmenu",function(e){
         return false;
});
});

It’s done in 5 lines of code, it’s easy. Of course, friends can freely expand it to block the specified items in the right-click menu.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template