📄 linkadd.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="cook.asp"-->
<!--#include file="info.asp"-->
<script laguage="javascript">
<!--
function form1_onsubmit()
{
if (document.form1.name.value=="")
{
alert("请输入站点名称!")
document.form1.name.focus()
return false
}
else if(document.form1.place.value=="")
{
alert("请输入站点地址!")
document.form1.place.focus()
return false
}
}
-->
</script>
<%
if request.Form("sub")="submit" then
name=request.Form("name")
place=request.Form("place")
if name="" or place="" then
response.Write"<script>alert('链接内容不能为空!');history.go(-1)</script>"
response.End()
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from link"
rs.open sql,conn,3,3
rs.addnew
rs("name")=name
rs("place")=place
rs.update
response.Write"<script>alert('链接添加成功!');window.location.href('link.asp')</script>"
response.End()
end if
end if
call htmltop()
%>
<table width="700" height="400" border="0" align="center" cellpadding="0" cellspacing="0" class="TdStyle">
<tr>
<td align="center" valign="top" bgcolor="#FFFFFF"><br>
<table width="600" border="0" cellpadding="5" cellspacing="1" bgcolor="#C0C0C0">
<form name="form1" method="post" action="linkadd.asp" onsubmit="return form1_onsubmit()">
<tr align="center" bgcolor="#E3E3E3">
<td height="30" colspan="2"><B>添 加 链 接</B></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100" height="25" align="right">站点名称:</td>
<td width="500"><input name="name" type="text" id="name" size="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">站点地址:</td>
<td><input name="place" type="text" id="place" size="30"></td>
</tr>
<tr align="center" bgcolor="#E3E3E3">
<td height="30" colspan="2">
<input type="submit" name="submit" value="提交">
<input type="hidden" name="sub" value="submit">
<input type="reset" name="Submit2" value="重置"></td>
</tr></form>
</table><br></td>
</tr>
</table>
<%
call htmlend()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -