--------------------------------------------第一个页面--------------------------------------------------
<!-- #include file = "conn.asp"-->
<%
Set rs = Server.CreateObject("adodb.recordset")
sql="Select * From Student"
rs.open sql,conn,1
%>
<script>
<!--
function session(id){ //这里是想把点击的时候把值放进session里面..
<% session("ID") = id %>;
}
//-->
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<body>
<%do while not rs.eof%>
<a href="b.asp" onClick="session(<%=rs("stuNo")%>)"> //b.asp是模版文件
<%=rs("stuName")%> </a>
<%
rs.movenext
Loop
%>
</body>
</html>
--------------------------------------------第二个页面------------------------------------------------
<!-- #include file = "conn.asp"-->
<%
Set rs = Server.CreateObject("adodb.recordset")
sql="Select * From Student Where stuNo ="&session("ID")
rs.open sql,conn,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<body>
<% do while not rs.eof %>
<% =rs("stuName") %>
<%
rs.movenext
Loop
%>
</body>
</html>
传递不了值.....听说可以用什么GET????可以提供一下吗???
[此贴子已经被作者于2007-6-24 15:27:43编辑过]