这是一个jQuery用来显示上下文菜单(响应鼠标右键)的插件
示例代码:
$(document).ready(function(){ $("#selector").contextMenu({ menu:'myMenu' }, function(action,el,pos){ alert( 'Action:'+action+'nn'+ 'ElementID:'+$(el).attr('id')+'nn'+ 'X:'+pos.x+' Y:'+pos.y+'(relativetoelement)nn'+ 'X:'+pos.docX+' Y:'+pos.docY+'(relativetodocument)' ); });});
评论