?? add.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%
if session("pass")<> 1 then
response.redirect "login.asp"
else
end if
if request("q")<>"" then
q=Request("q")
a=Request("a")
b=Request("b")
c=Request("c")
d=Request("d")
ans=Request("ans")
set rs=server.createobject("adodb.recordset")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="& Server.MapPath("exercise.mdb")
sql="insert into test (question,a,b,c,d,ans) values('"&q&"','"&a&"','"&b&"','"&c&"','"&d&"','"&ans&"')"
set rs=conn.execute(sql)
end if
%>
<body>
<form>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="83%">考題:
<input name="q" type="text">
答案:
<input name="ans" type="text">
</td>
<td width="17%"><input name="Submit" type="submit" value="修改"></td>
</tr>
<tr>
<td height="21" colspan="2">A:
<input name="a" type="text">
</td>
</tr>
<tr>
<td colspan="2">B:
<input name="b" type="text">
</td>
</tr>
<tr>
<td colspan="2">C:
<input name="c" type="text">
</td>
</tr>
<tr>
<td colspan="2">D:
<input name="d" type="text">
</td>
</tr>
</table>
<br>
<a href="adm.asp">點擊返回</a>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -