<%
String id = request.getParameter("id");
%>
<form name="BmBmCx" action="#">
<tr>
请输入部门别名:
<td valign="top">
<input name="BmSx" type="text">
<input name="" type="submit">
</td>
</tr>
</form>
这是一段简单的代码,我想问的是,如何用from表单把id 的值传本页面呢。
String id = request.getParameter("id");
%>
<form name="BmBmCx" action="#">
<tr>
请输入部门别名:
<td valign="top">
<input name="BmSx" type="text">
<input name="" type="submit">
</td>
</tr>
</form>
这是一段简单的代码,我想问的是,如何用from表单把id 的值传本页面呢。
<%
Integer id = (Integer)request.getParameter("id");
%>
ID:<%=id %>
<%
String id = request.getParameter("id");
%>
<form name="BmBmCx" action="#">
<tr>
请输入部门别名:
<td valign="top">
<input name="BmSx" type="text">
<input name="" type="submit">
</td>
</tr>
</form>
<%
String strSQL = "select * from Hospital_Bed where DelFlag <> '1' and DeptId = "+id+" and Room like '%"+BmCx+"%'";
ResultSet rs = sts.executeQuery(strSQL);
%>
我要设计一个查询功能,但是,我现在实现不了,因为点下submit的时候,id的值就变成null了。
<%
String id = request.getParameter("id");
String sBmCx= request.getParameter("BmCx");
%>
<form name="BmBmCx" action="#">
<tr>
请输入部门别名:
<td valign="top">
<input name="BmSx" type="text">
<input name="id" type="text">
<input name="" type="submit">
</td>
</tr>
</form>
<%
String strSQL = "select * from Hospital_Bed where DelFlag <> '1' and DeptId = "+id+" and Room like '%"+sBmCx+"%'";
ResultSet rs = sts.executeQuery(strSQL);
%>
<input name="id" type="hidden" value=<%=id%>>
.............