草写的
<div id=menu style=position:absolute>Menu</div>
<table border>
<tr><td>在表格的每一行显示一条记录,当鼠标移到某一行时,表格的这一<tr><td>行就全部加亮,并可以点击鼠标右键,弹出“修改”和“删除”的<tr><td>菜单,点击“修改”,弹出新页面,显示在表格中选中的记录,删<tr><td>除的方式也一样。
<tr><td>    该如何实现呢?
<tr><td>    有没有其他的方式实现类似以上的数据的查询、修改、删除,<tr><td>基于页面的,不用Applet的。
<tr><td>    多谢各位!
</table>
<script>
function document.onclick(){
var e=window.event.srcElement
if(!menu.contains(e))menu.style.display='none';
}function document.onmouseover(){
var e=window.event.srcElement
if(e.tagName=="TD")e.runtimeStyle.backgroundColor="highlight";
}
function document.onmouseout(){
var e=window.event.srcElement
if(e.tagName=="TD")e.runtimeStyle.backgroundColor="";
}
function document.oncontextmenu(){
var e=window.event.srcElement
if(e.tagName=="TD")with(window.event){
show(menu,clientX,clientY,e.parentElement.rowIndex);returnValue=false;
}
}
function show(obj,x,y,id){
obj.style.pixelLeft=x
obj.style.pixelTop=y
menu.style.display='block'
menu.innerHTML="<a href=javascript:window.open('modify.asp?id="+id+"')>修改</a><br><a href=javascript:window.open('delete.asp?id="+id+"')>删除</a>"
}
</script>