?? addsectiondone.asp
字號(hào):
<%
%>
<!--#include file='../conn.asp'-->
<%
SectionName = request("SectionName") '獲得部門名
SectionName = replace(SectionName,"'","''") '替換部門名中的'符號(hào)
set rs = conn.execute("select * from Section where sectionName ='"&SectionName&"'") '讀取不盟數(shù)據(jù)
if not (rs.bof or rs.eof) then '如果部門名重復(fù)
response.write "<script language=javascript>" 'JavaScript
response.write"alert('該部門已經(jīng)存在!');" '警告
response.write"location.href='addSection.asp';" '返回到添加部門頁(yè)面
response.write "</script>" 'JavaScript結(jié)束
response.end '停止解析,立即執(zhí)行JavaScript
end if
sql="insert into Section (SectionName) values('"&SectionName&"')" '如果沒(méi)有重復(fù),添加數(shù)據(jù)到數(shù)據(jù)庫(kù)
conn.execute( sql )
%>
<html>
<head>
<title>添加新部門</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<LINK
href="../css.css" type=text/css rel=stylesheet>
</head>
<body>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td width="100%" height="197" align="center">
<table border="0" cellspacing="0" cellpadding="0" height="85" bgcolor="#99ccff" width="100%">
<tr>
<td align="center">
<a href="addSection.asp" class=linkblue2>已創(chuàng)建新部門記錄</a>
<script>
setTimeout("location.replace('addSection.asp')",2000)
</script>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -