html 代码如下:
<html>
<head><script language="JavaScript" type="text/JavaScript" src="js/xcalendar.js"></script> </script>
</head>
<body>
<DIV ALIGN=CENTER>
<FONT class = "s1">广州 工作量统计</FONT>
</DIV>
<FORM METHOD="POST" name="SPARE">
<DIV ALIGN=CENTER>
<TABLE>
<TR> <TD class = "tdlabel">操作日期 </TD>
<TD class = "tdfeild">
<div align="left">
<FONT class = "s1">开始日期:</FONT>
<input title="" name="STARTDATEValue" value="" class="calendar">
<input name="STARTDATEValue_ctrl" type=button class=calendar_button value=" " style="cursor:hand;" onclick="setday(this,document.all.STARTDATEValue)"><br>
<FONT class = "s1">结束日期:</FONT>
<input title="" name="STARTDATEValue2" value="" class="calendar">
<input name="STARTDATEValue2_ctrl" type=button class=calendar_button value=" " style="cursor:hand;" onclick="setday(this,document.all.STARTDATEValue2)">
</div>
</TD>
<TD ROWSPAN = 2>
<a href="test.jsp?name=工作量统计&">工作量统计(点击统计)</a>
<!--问题:怎么把STARTDATEValue和STARTDATEValue2的值传送到test.jsp中,然后进行处理??-->
</TD>
</TR>
</TABLE>
</DIV>
</FORM>
</body>
</html>
<html>
<head><script language="JavaScript" type="text/JavaScript" src="js/xcalendar.js"></script> </script>
</head>
<body>
<DIV ALIGN=CENTER>
<FONT class = "s1">广州 工作量统计</FONT>
</DIV>
<FORM METHOD="POST" name="SPARE">
<DIV ALIGN=CENTER>
<TABLE>
<TR> <TD class = "tdlabel">操作日期 </TD>
<TD class = "tdfeild">
<div align="left">
<FONT class = "s1">开始日期:</FONT>
<input title="" name="STARTDATEValue" value="" class="calendar">
<input name="STARTDATEValue_ctrl" type=button class=calendar_button value=" " style="cursor:hand;" onclick="setday(this,document.all.STARTDATEValue)"><br>
<FONT class = "s1">结束日期:</FONT>
<input title="" name="STARTDATEValue2" value="" class="calendar">
<input name="STARTDATEValue2_ctrl" type=button class=calendar_button value=" " style="cursor:hand;" onclick="setday(this,document.all.STARTDATEValue2)">
</div>
</TD>
<TD ROWSPAN = 2>
<a href="test.jsp?name=工作量统计&">工作量统计(点击统计)</a>
<!--问题:怎么把STARTDATEValue和STARTDATEValue2的值传送到test.jsp中,然后进行处理??-->
</TD>
</TR>
</TABLE>
</DIV>
</FORM>
</body>
</html>
<FORM METHOD="POST" name="SPARE">
改成
<FORM METHOD="POST" name="SPARE" action="test.jsp">
即可
<input name="STARTDATEValue_ctrl" type=button class=calendar_button value=" " style="cursor:hand;" onclick="setday(this,document.all.STARTDATEValue)"> <br>
<FONT class = "s1">结束日期: </FONT>
<input title="" name="STARTDATEValue2" value="" class="calendar">
<input name="STARTDATEValue2_ctrl" type=button class=calendar_button value=" " style="cursor:hand;" onclick="setday(this,document.all.STARTDATEValue2)"> </form>
借用楼上的
<form name="form1" method="post" action="test.jps">
表单提交的方式为 post 提交到 test.jsp
表单提交的方式为 post 提交到 test.jsp
String sql1 = request.getParameter("STARTDATEValue");
但是我打印出来为:null
System.out.println(sql)1;