如何才能只显示菜单,不显示选项?(关于右键弹出菜单问题)谢谢!
<style>
<!--
.css1{background:c0c0c0;color:000000}
.css2{background:ffffff;color:000000}
-->
</style>
<script>
<!--
function showhidden(){
if(event.button==2){showMenu()}
else{hidden()}
}
function showMenu(){
var e=event.srcElement;
menu.style.top=window.event.clientY
menu.style.left=window.event.clientX
menu.style.visibility='visible';
}
function hidden(){
menu.style.visibility='hidden'
menu.style.left=0
menu.style.top=0
}
document.onmousedown=showhidden;
-->
</script>
<div style="position:absolute;left:0;top:0;width:100;backgroundr:c0c0c0;visibility:hidden;border:1px outset black" id='menu'>
<div onmouseover="this.className='css1'" onmouseout="this.className='css2'" style="padding:1;width:100%;border:1px outset">你好</div>
<div onmouseover="this.className='css1'" onmouseout="this.className='css2'" style="padding:1;width:100%;border:1px outset">他好</div>
<div onmouseover="this.className='css1'" onmouseout="this.className='css2'" style="padding:1;width:100%;border:1px outset">我好</div>
</div>