动态的也是可以的,只是你没有传对而已。
你说的不是太详细,不过我想你应该有一个
<form action="xxx.jsp" method="post">
<table>
<tr>
<td>
<input type="hidden" name="name" value="aaaaa">
</td>
</tr>
</table>
</form>然后在xxx.jsp网页内取
<%
String name=request.getParameter("name");
out.println(name);
%>
应该就对了
你说的不是太详细,不过我想你应该有一个
<form action="xxx.jsp" method="post">
<table>
<tr>
<td>
<input type="hidden" name="name" value="aaaaa">
</td>
</tr>
</table>
</form>然后在xxx.jsp网页内取
<%
String name=request.getParameter("name");
out.println(name);
%>
应该就对了
应用string[] aaa=request.getParameterValues(hidden_id),取值动态的绝对可以取值。只是你取的不对
<%
System.out.println("new xx value is:"+request.getParameter("xxx"));
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Power Table</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><script language="javascript">
function addHid( td ){
if(td.getElementsByTagName("input").length == 0){
var hElem = document.createElement("input");
hElem.name= "xxx";
hElem.id= "xxx";
hElem.type="text";
hElem.value= "xxx";
td.appendChild(hElem);
}
}function sub(){alert(document.form1.xxx.value);
}
</script>
<body><form name="form1" method="post" action="" >
<p> </p>
<TABLE width=100% border=1 cellSpacing=0 cellPadding=2 id="PowerTable" >
<TR align=middle bgColor=#ffcc00>
<TD onBlur="getCellTextName(this)">First Name</TD>
<TD>Last Name</TD>
<TD>Team</TD>
<TD>Engine</TD>
<TD>Tyres</TD>
<TD>Fastest Lap</TD>
<TD onclick="addHid(this)">国家</TD></TR>
</TABLE>
<p>
<input type=button value=ins_row onclick=add_row(Main_Tab)>
<input type=button value=ins_col onclick=add_col(Main_Tab)>
<input type=button value=Del_row onclick=del_row(Main_Tab)>
<input type=button value=Del_col onclick=del_col(Main_Tab)>
<input type=button value=Restore onclick=res_tab(Main_Tab)>
<input type=button value=Export onclick=exp_tab(Main_Tab)>
( Move:
<input type=button id=move value=Up onclick=Move_up(Main_Tab)>
<input type=button id=move value=Down onclick=Move_down(Main_Tab)>
<input type=button id=move value=Left onclick=Move_left(Main_Tab)>
<input type=button id=move value=Right onclick=Move_right(Main_Tab)> )
<input type="text" id="testTxt" value="">
</p>
<input type="Submit" name="Submit" value="Submit" onclick="sub()">
</form></body>
</html>