📄 my_muadd.asp
字号:
<!--#include file="config.Asp"-->
<% if session("login")="" then
response.Redirect"index.asp"
end if %>
<% if request("act")="save" then
yhid=request.Form("yhid")
kid=request.Form("kid")
muname=request.Form("muname")
muurl=request.Form("muurl")
set rst=server.CreateObject("adodb.recordset")
rst.open"select * from favxx",conn,3,3
rst.addnew()
rst("yhid")=yhid
rst("muname")=muname
rst("muurl")=muurl
rst("kid")=kid
rst.update
rst.close
set rst=nothing
response.Write"<script language=javascript>alert('增加成功!');location.href('my_mu.asp?l="&kid&"');</script>"
response.End()
end if %>
<% yhid=session("login")
l=request.QueryString("l")
if l=1 then
t="网址"
elseif l=2 then
t="歌曲"
end if %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function presub()
{
if(form1.muname.value=="")
{
alert("名称不能为空!");
form1.muname.focus();
return false;
}
return true;
if(form1.muurl.value=="")
{
alert("地址不能为空!");
form1.muurl.focus();
return false;
}
return true;
}
//-->
</script>
</head>
<body>
<table width="80%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#0099CC">
<tr>
<td bgcolor="#FFFFFF" height="25" align="center">新增<%= t %></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<form name="form1" action="?act=save" method="post">
<table width="100%" border="0" cellpadding="3" cellspacing="1">
<tr>
<td width="16%" align="right"><%= t %>名称:</td>
<td width="84%"><input name="muname" type="text" id="muname" size="30">
<input name="yhid" type="hidden" id="yhid" value="<%= yhid %>">
<input name="kid" type="hidden" id="kid" value="<%= l %>"></td>
</tr>
<tr>
<td width="16%" align="right"><%= t %>地址:</td>
<td width="84%"><input name="muurl" type="text" id="muurl" size="60">
<font color="#FF0000">(注:地址必须带http://)</font></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="Submit" value="增 加" onsubmit="return presub()">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -