editquestion.jsp

来自「这个主要是运用JAVA+JAVABEAN实现的网上投票调查系统」· JSP 代码 · 共 41 行

JSP
41
字号
<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%@page contentType="text/html;charset=GB2312"%>
<%@include file="opendata.jsp"%>
<%@include file="check.jsp"%>
<html>
<head>
<title>修改选项</title>
<LINK href="style.css" rel=stylesheet>
</head>
<% 
 request.setCharacterEncoding("GB2312");
 int questionid = Integer.parseInt(request.getParameter("questionid"));
 sql = "SELECT Question from Questions where QuestionID ="+questionid;
 rs = smt.executeQuery(sql);
 String question = null;
 while(rs.next())
   question = rs.getString(1);

%>
<DIV align=center>
<hr>
  <center>
  修改选项
    <form name="form1" method="post" action="modquestion.jsp?questionid=<%=questionid%>">
	    <TABLE cellSpacing=0 cellPadding=0 width=250 align="center" border=0>
        <TBODY>
        <TR>
          
		  <td align=right><input type="text" size=90 name="question" value = "<%=question%>"</td></TR>
        <TR>
          <TD>
            <DIV align=center><INPUT class="buttonface" type="submit" value="确认" name="Submit">&nbsp;
<INPUT class="buttonface" type="reset" value="清除" name="Submit2">
            <BR><BR></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></FORM>
          <% 
		  rs.close();
		  smt.close();%>
    </form>
  </center>
</DIV>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?