我在有连接的图片上做了一个右键菜单,
<img src="image/23.JPG" width="104" height="102"  border="0" onMouseUp="setMenu(<%=rs("id")%>)">function setMenu(cid){
if(event.button==2){
showMenu(cid);
}
}function showMenu(cid){

var x, y, w, h, ox, oy;
  x = event.clientX;
  y = event.clientY;
  var obj = document.getElementById("haha1");
  if (obj == null)
   return true;
  ox = document.body.clientWidth;
  oy = document.body.clientHeight;
  if(x > ox || y > oy)
   return false;
  w = obj.offsetWidth;
  h = obj.offsetHeight;
  if((x + w) > ox)
    x = x - w;
  if((y + h) > oy)
   y = y - h;
 
  obj.style.posLeft = x + document.body.scrollLeft;
  obj.style.posTop = y + document.body.scrollTop;
  obj.style.visibility = "visible";
  return false;
}
<div id="haha1" style="BACKGROUND-COLOR: #ffffff; BORDER: #000000 1px solid; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: hidden; Z-INDEX: 20">
<table width=12% border=0 cellspacing=0 cellpadding=0>
      <tr>
        <td height=10 align=center></td>
      </tr>
  <tr>
        <td height=10 align=center>删除</td>
      </tr>
</table>
</div>请问在haha1这个层中取到cid这个值...谢谢了.