?? updatest2.asp
字號:
<%response.buffer=true%>
<HTML>
<HEAD>
<TITLE><%=title%></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" type="text/css" href="css/index1.css">
<link rel="stylesheet" type="text/css" href="css/toolbar2.css">
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
<base target="_self">
</HEAD>
<BODY background="image/A-bg.gif" leftMargin=0 topMargin=0>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 class=c width=400>
<tr>
<td width=100% height="197" align="center">
<table border="0" cellspacing="0" cellpadding="0" height="85" bgcolor="#eeeeee" width="100%">
<tr>
<td align="center">
<%
if not instr(1,Request.ServerVariables("http_Referer"),Request.ServerVariables ("SERVER_NAME"),1)=8 then
response.write "<b>此時不能刷新!!!</b>"
response.end
end if
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("CSTUDY.mdb")
set rootrs= server.createobject("adodb.recordset")
mySQL = "SELECT * FROM test"
rootrs.Open mySQL,conn,1,1
testid=trim(request.form("testid"))
content=trim(request.form("content"))
a=trim(request.form("a"))
b=trim(request.form("b"))
c=trim(request.form("c"))
d=trim(request.form("d"))
answer=trim(request.form("answer"))
explain=trim(request.form("explain"))
SQL = "Update test Set subject="
SQL = SQL & "'" &content& "'" & ","
SQL = SQL & "A="
SQL = SQL & "'" &a& "'" & ","
SQL = SQL & "B="
SQL = SQL & "'" &b& "'" & ","
SQL = SQL & "C="
SQL = SQL & "'" &c& "'" & ","
SQL = SQL & "D="
SQL = SQL & "'" &d& "'" & ","
SQL = SQL & "explain="
SQL = SQL & "'"&explain&"'"
SQL = SQL & " where ID="&testid&""
Conn.Execute SQL
conn.Close
set conn=nothing
%>
該題目信息更改成功!!<br>
<p></p>
<script>
setTimeout("location.replace('updatest1.asp?testid=<%=testid%>')",1500)
</script>
</td>
</tr>
</table>
</td>
<td valign="middle" align="center">
</td>
</tr>
</table>
</BODY>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -