Jquery/JS prevent right click menu in browsers

前端 未结 12 1720
孤城傲影
孤城傲影 2020-12-03 00:42

I have my div with a right click popup menu:

// Attatch right click event to folder for extra options
$(\'#fBox\' + folderID).mousedown(function(event) {
            


        
12条回答
  •  自闭症患者
    2020-12-03 00:58

    Try this:

    $('#fBox' + folderID).bind("contextmenu", function () {
                    alert("Right click not allowed");
                    return false;
                });
    

提交回复
热议问题