鼠标右键的问题,小白提问
问题描述如下:实用asp.net实现网页右键,现在我用下面的代码可以显示右键,代码是我从别处抄来的,我不知道怎么改才能让它实现具体的点击某个右键选项,现在右键选项是空的,举例说我想要右键点击第一个“实时数据”的话,怎么让他跳转到另外的页面,其实就是怎么在右键添加动作,求教啊,从C#刚刚转战asp。net,小白一枚

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>自定义鼠标右键</title>
<script language="javascript" type="text/javascript">
document.oncontextmenu = function () {
var div = document.getElementById("hdiv");
div.style.pixelLeft = event.clientX;
div.style.pixelTop = event.clientY;
div.style.display = "block";
return false;
}
</script>
</head>
<body>
<div id="hdiv" align="center" style="position:absolute; display:none; background-color:#EFF8FF; height:100px; width:100px; top:0px; left:0px; ">
<fieldset style="border-color:#96C2EF; border-width:1px; border-style:solid;">
<legend>总控表</legend>
<table width="100%" bgcolor="#ECE9D8" style="cursor:pointer;">
<tr onmouseover="this.bgColor='FFFFFF'" onmouseout="this.bgColor='#ECE9D8'">
<td align="center" onclick="hdiv.style.display='实时数据'" >实时数据</td>
</tr>
<tr onmouseover="this.bgColor='FFFFFF'" onmouseout="this.bgColor='#ECE9D8'">
<td align="center" onclick="hdiv.style.display='历史数据'" >历史数据</td>
</tr>
<tr onmouseover="this.bgColor='FFFFFF'" onmouseout="this.bgColor='#ECE9D8'">
<td align="center" onclick="hdiv.style.display='关闭菜单'">关闭菜单</td>
</tr>
</table>
</fieldset>
</div>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Web1.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script language="javascript" type="text/javascript">
document.oncontextmenu = function () {
var div = document.getElementById("hdiv");
div.style.pixelLeft = event.clientX;
div.style.pixelTop = event.clientY;
div.style.display = "block";
return false;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="hdiv" align="center" style="position: absolute; display: none; background-color: #EFF8FF;
height: 100px; width: 100px; top: 0px; left: 0px;">
<fieldset style="border-color: #96C2EF; border-width: 1px; border-style: solid;">
<legend>总控表</legend>
<table width="100%" bgcolor="#ECE9D8" style="cursor: pointer;">
<tr onmouseover="this.bgColor='FFFFFF'" onmouseout="this.bgColor='#ECE9D8'">
<td align="center" onclick="javascript:window.location.href='http://www.baidu.com';">
实时数据
</td>
</tr>
<tr onmouseover="this.bgColor='FFFFFF'" onmouseout="this.bgColor='#ECE9D8'">
<td align="center" onclick="javascript:window.location.href='http://www.sina.com';">
历史数据
</td>
</tr>
<tr onmouseover="this.bgColor='FFFFFF'" onmouseout="this.bgColor='#ECE9D8'">
<td align="center" onclick="javascript:window.location.href='http://www.sohu.com';">
关闭菜单
</td>
</tr>
</table>
</fieldset>
</div>
</form>
</body>
</html>