日期:2014-05-16 浏览次数:20461 次
<style type="text/css"> #popmenu{position:absolute;width:100px;height:200px;background:#eee;display:none;} </style> <script type="text/javascript"> document.oncontextmenu = function (e) { e = e || window.event; var m = document.getElementById('popmenu'); m.style.left = e.clientX + 'px'; m.style.top = e.clientY + 'px'; m.style.display = 'block'; return false; } </script> <body> <div id="popmenu">自定义右键菜单内容</div>