这主要是一段修改用户信息的代码,修改那就是获取本页的值的
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@page import="bean.Cinfo"%>
<%@page import="bean.DBConn"%>
<!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=UTF-8" />
<title>客户信息修改</title>
<style type="text/css">
<!--
.STYLE1 {
font-family: "宋体"
}
.STYLE2 {
color: #0000FF
}
body {
background-image: url(file:///F|/picture/a0b966f55ddc9919bc31098b.jpg);
}
-->
</style>
</head>
<body>
<%
List list = (List) session.getAttribute("listCinfo");
%>
<form action="./ModifyCinfo" method="post" name="form1" id="form1">
<span class="STYLE1"> <label>
</label> </span>
<label>
<div align="left" class="STYLE1">
<h1 align="center" class="STYLE2">
阳光酒店
</h1>
<p>
</p>
<p>
</p>
<div align="center">
<br/>
<br/>
</div>
<div align="center">
<table width="85%" border="1">
<tr>
<td>
序号
</td>
<td>
客户姓名
</td>
<td>
密码
</td>
<td>
身份证号
</td>
<td>
电话
</td>
<td>
是否修改
</td>
</tr>
<%
for (int i = 0; i < list.size(); i++) {
Cinfo cinfo = (Cinfo) list.get(i);
int id = cinfo.getId();
%>
<tr>
<td><%=id%></td>
<%
String cname = cinfo.getCname();
%>
<td><%=cname%></td>
<%
String csex =cinfo.getCsex();
%>
<td><%=csex%></td>
<%
String cidno = cinfo.getCidno();
%>
<td><%=cidno%></td>
<%
String ctel = cinfo.getCtel();
%>
<td id="" ><%=ctel%></td>
<td>
<a href="modifyuserinfo.jsp?id=<%=id%>&cname=<%=cname%>&csex=<%=csex%>&cidno=<%=cidno%>&ctel=<%=ctel%>">修改</a>
</td>
<%
}
%>
</tr>
</table>
<p>
<label>
<input onclick="javascript:window.location.href='usermanage.jsp'" type="button" name="Submit" value="返回" />
</label>
</p>
</div>
</form>
</body>
</html>
追问不是这种的,是本页面的一个隐藏域已经有值,要取到它,在java代码中用怎么取;如,这个域里已经有值,怎么取到在本页
追答一个js中写就行,document.getElementsByName("comcode");
这样就能取到了