<%!
String task,budget,email;
%>
<%
task=request.getParameter("id");
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@vaio:1521:XE","system","manager");
PreparedStatement stmt= con.prepareStatement("Select * from tasks where task=?");
stmt.setString(1,task);
ResultSet rset=stmt.executeQuery();
if(rset.next())
{
email=rset.getString(1);
budget=rset.getString(3);
}
%>
<html>
<script type="text/javascript">
function generate()
{
document.show.style.visibility="visible";
}
</script>
<body>
<table>
<tr style="font-size: 30px;">
<td><%out.println(task);%></td>
<td><%out.println(budget);%></td>
</tr>
<tr><td></td><td>posted by:<%out.println(email); %></td></tr>
<tr>
<td></td><td><form >
<input type="submit" value="Post bids" onclick="generate()"/>
</form></td></tr>
<tr>
<td>
<form name="show" action="addBids.jsp" style="visibility:hidden">
<input type="text">
<input type="submit" value="submit">
</form>
</td>
</tr>
</table>
</body>
</html>
<jsp:include page="showBids.jsp"></jsp:include>
我有上面的 jsp 页面来显示像自由职业者项目这样的细节。单击“发布出价”按钮后,我的表单“显示”仅显示一秒钟,并且我的页面 id 更改为 null。请帮忙。