editquestion.jsp
上传用户:apbaoyuan
上传日期:2021-02-12
资源大小:1015k
文件大小:1k
源码类别:

Jsp/Servlet

开发平台:

HTML/CSS

  1. <%@page import="java.sql.*"%>
  2. <%@page import="java.util.*"%>
  3. <%@page contentType="text/html;charset=GB2312"%>
  4. <%@include file="opendata.jsp"%>
  5. <%@include file="check.jsp"%>
  6. <html>
  7. <head>
  8. <title>修改选项</title>
  9. <link href="style.css" rel=stylesheet>
  10. </head>
  11. <% try{
  12. request.setCharacterEncoding("GB2312");
  13.  int questionid = Integer.parseInt(request.getParameter("questionid"));
  14.  sql = "SELECT Question from Questions where QuestionID ="+questionid;
  15.  rs = smt.executeQuery(sql);
  16.  String question = null;
  17.  while(rs.next())
  18.    question = rs.getString(1);
  19.     rs.close();
  20.    smt.close();
  21.    con.close();
  22. %>
  23. <div align=center>
  24. <hr>
  25. <center>修改选项
  26. <form name="form1" method="post" action="modquestion.jsp?questionid=<%=questionid%>">
  27. <table cellSpacing=0 cellPadding=0 width=250 align=center border=0>
  28. <tbody>
  29. <tr>
  30. <td align=right><input type=text size=90 name=question value = "<%=question%>">
  31. </td></tr>
  32. <% 
  33. }
  34.  
  35.  catch (Exception e) {
  36. e.getStackTrace();
  37. }%>
  38. <tr>
  39. <td><div align=center><input class=buttonface type=submit value=确认 name=Submit>
  40.                       <input class=buttonface type=reset value=复位 name=Submit2><br><br>
  41. </div></td></tr></tbody></table></form>
  42. </center>
  43. </div>