easyui 阻止弹出浏览器右键

 

在script中使用

var doc = document.getElementByXXX(XXXX);

doc.contextMenu = function(){

  return false;

}

在easyui的tree中不起作用

 

阻止浏览器弹出右键信息 在contextMenu方法中执行事件e的preventDefault();就可以了(return false 不管用)

onContextMenu:function(e,node){
console.log(e);
console.log(node);
var mm = $('#mm');
mm.menu('show', {
left: 200,
top: 100
});
e.preventDefault();
},

posted on 2017-02-13 10:30  飞尘-海棠梨花  阅读(1081)  评论(0编辑  收藏  举报

导航