📄 type_2_edit.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ page import="DataBase.DBConn"%>
<%@ page import="java.sql.ResultSet"%>
<script language=javascript>
function check()
{
if (document.form1.t1.value=="")
{alert("请录入题干!");
document.form1.t1.focus();
return false;}
if (document.form1.txt1.value=="")
{alert("请录入选项1!");
document.form1.txt1.focus();
return false;}
if (document.form1.txt2.value=="")
{alert("请录入选项2!");
document.form1.txt2.focus();
return false;}
if (document.form1.txt3.value=="")
{alert("请录入选项3!");
document.form1.txt3.focus();
return false;}
if (document.form1.txt4.value=="")
{alert("请录入选项4!");
document.form1.txt4.focus();
return false;}
document.form1.ctype.value="types";
document.form1.submit();
}
</script>
<html>
<head>
<%!
String tgan,dan,A1,B1,C1,D1;
%>
<title>网上考试系统</title>
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body topmargin="0" leftmargin="0">
<%
request.setCharacterEncoding("GBK");
response.setCharacterEncoding("GBK");
int id=Integer.parseInt(request.getParameter("id"));%>
<%DBConn db=new DBConn();
String sql="select * from xzt where id='"+id+"'";
ResultSet rs=db.Query(sql);
rs.next();
tgan=rs.getString("tgan");
dan=rs.getString("dan");
A1=rs.getString("A");
B1=rs.getString("B");
C1=rs.getString("C");
D1=rs.getString("D");
%>
<p>
<p align="center"><font class=test1>选择题 题库管理</font></p>
<div align="center">
<center>
<form name=form1 method="post" action="yanzheng8.jsp" >
<input type="hidden" name="ctype" >
<input type="hidden" name=id value=<%=id%>>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600">
<tr>
<td align="center" colspan="3">修改选择题</td>
</tr>
<tr>
<td width="50" align="center" bgcolor="#CBEFDC">编号</td>
<td width="500" align="center" bgcolor="#CBEFDC">题目</td>
<td width="50" align="center" bgcolor="#CBEFDC">答案</td>
</tr>
<tr>
<td align="center" rowspan="3"><%=id%></td>
<td> <input type="text" name="t1" size="65" class="line" value=<%=tgan%>></td>
<td align="center" rowspan="3">
<select size="1" name="cate">
<option <%=dan.equals("A")?"selected":""%>>A</option>
<option <%=dan.equals("B")?"selected":""%>>B</option>
<option <%=dan.equals("C")?"selected":""%>>C</option>
<option <%=dan.equals("D")?"selected":""%>>D</option>
</select></td>
</tr>
<tr>
<td> A.<input type="text" name="txt1" size="20" class="line" value=<%=A1%>>
B.<input type="text" name="txt2" size="20" class="line" value=<%=B1%>></td>
</tr>
<tr>
<td> C.<input type="text" name="txt3" size="20" class="line" value=<%=C1%>>
D.<input type="text" name="txt4" size="20" class="line" value=<%=D1%>></td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="button" value="提交" name="B1" onclick="check()"> <input type="reset" value="重置" name="B2"></td>
</tr>
</table></form>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -