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
WBOYOriginal
2016-05-16 16:10:181055browse

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.

Statement:
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