📄 addsubclass.asp
字号:
<!--#include file="globe/DataConnect.asp"-->
<%
Dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="select * from Class"
rs.open sql,cnn,1,1
%>
<html>
<head>
<title>AddSubClass</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK REL="stylesheet" TYPE="text/css" HREF="globe/style.css">
<script language="vbScript">
'防止填空
function submit1_onclick()
dim name1,name2
name1=trim(form.ClassName1.value)
name2=trim(form.ClassName.value)
if name2="" then
alert("同学!还没有总类呢!")
form.ClassName1.focus()
submit1_onclick=false
elseif len(name1)>11 then
alert("同学,分类名不能超过11个字节!你自己想办法吧。")
form.ClassName1.focus()
submit1_onclick=false
elseif name1="" then
alert("同学,你填空的,算什么呀?")
form.ClassName.focus()
submit1_onclick=false
else
submit1_onclick=true
end if
end function
</script>
</head>
<body bgcolor="#ccddff">
<%'error handler
Dim error
error=request.querystring("error")
if error<>"" then
response.write error&"<br>"
end if
%>
<form name="form" method="post" action="DoAddSubClass.asp">
<div id="Layer1" style="position:absolute; left:147px; top:92px; width:331px; height:171px; z-index:1">
<table width="100%" border="1" height="156" bordercolorlight="#FFFFFF" bordercolordark="#000000" bgcolor="#C8DCFF" cellpadding="4" cellspacing="0">
<tr bgcolor="#D0E0FF">
<td colspan="2">
<div align="center"><font color="#0000FF">增 加 新 子 分 类</font></div>
</td>
</tr>
<tr>
<td width="43%" height="43"><font color="#FF0033"> 所属的分类名:</font></td>
<td width="57%" height="43">
<select name="ClassName">
<%
Dim i,Name,Num
for i=1 to rs.recordcount
Name=rs("Name")
Num=rs("Num")
%>
<option value=<%=Num%>><%=Name%></option>
<%
rs.movenext
next
rs.close
%>
</select>
</td>
</tr>
<tr>
<td width="43%" height="42"><font color="#FF0033"> 新子分类名:</font></td>
<td width="57%" height="42">
<input type="text" name="ClassName1" size=10>
</td>
</tr>
<tr>
<td colspan="2" height="53">
<input type="submit" name="Submit1" value="增 加">
<input type="reset" name="Submit2" value="重 写">
</td>
</tr>
</table><br>
<P align=right>
<font color="#339999"><A href="manager.htm"> <返回>
</A></font></P>
</div>
</form>
<!--#include file="globe/DataClose.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -