📄 add.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
response.redirect "index.asp"
end if
gename=request.form("gename")
gewho=request.form("gewho")
address=request.form("address")
if gewho="" then
gewho="不详"
end if
if address<>"" then
if address="rtsp://" then
response.write"<script>alert(""请填写歌曲地址!"");history.back();</script>"
response.end
end if
end if
if gename<>"" then
sql="select * from music"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
rs.addnew
rs("name")=gename
rs("who")=gewho
rs("url")=address
rs.update
response.redirect "ok.asp"
end if
%>
<html>
<head>
<style type="text/css">
<!--
td { font-size: 12px; line-height: 17px }
body { font-size: 12px; line-height: 17px }
p { margin-top: 1; margin-bottom: 1 }
a:link { text-decoration: none; color: black }
a:visited { text-decoration: none; color: black }
a:active { text-decoration: none }
a:hover { text-decoration: underline; color: red }
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>添加歌曲</title>
<SCRIPT LANGUAGE="JavaScript">
<!--//
function checkadd()
{
if (document.postart.gename.value.length<1)
{
alert("请填写歌曲名字!");
document.postart.gename.focus();
return false;
}
if (document.postart.address.value.length<1)
{
alert("请填写歌曲地址!");
document.postart.address.focus();
return false;
}
}
//-->
</SCRIPT>
</head>
<body background="images/bg.gif">
<div align="center">
<center>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="112">
<form action="" method="post" name="postart" onsubmit="return checkadd()">
<tr>
<td width="100%" colspan="2" height="19"></td>
</tr>
<tr>
<td width="41%" align="right" height="26">歌曲名字:</td>
<td width="59%" height="26"><input type="text" name="gename" size="30"></td>
</tr>
<tr>
<td width="41%" align="right" height="26">演 唱 者:</td>
<td width="59%" height="26"><input type="text" name="gewho" size="30"></td>
</tr>
<tr>
<td width="41%" align="right" height="26">歌曲地址:</td>
<td width="59%" height="26"><input type="text" name="address" size="30" value="http://"></td>
</tr>
<tr>
<td width="100%" align="right" colspan="2" height="41">
<p align="center"><input type="submit" value="提交" name="submit"> <input type="reset" value="取消" name="reset">
<input type="button" value="返回" name="back" onclick="javascript:history.back()"></td>
</tr>
</form>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -