📄 add.asp
字号:
<script>
//
// 力天2002网络办公系统
// Copyright (c) 深圳市力天软件开发有限公司
// http://www.ebexpert.net
//
// 文件名 : add.asp
// 描述 : 衣食住行数据添加与提交
// 版本 :
// 作者 : zyh
// 备注 :
</script>
<!--#include file="const.inc"-->
<% hname=trim(request("hname"))
if hname<>"" then
city=trim(request("city"))
phone=trim(request("phone"))
fax=trim(request("fax"))
address=trim(request("address"))
remark=trim(request("remark"))
Set conn=Server.CreateObject("ADODB.Connection")
DBPath1=server.mappath("../access.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
conn.Execute "insert into pubfood (hname,city,phone,fax,address,remark) values ('" & hname & "','" & city & "','" & phone & "','" & fax & "','" & address & "','" & remark & "')"
set conn=nothing
%>
<script language=javascript>
window.close();
window.opener.parent.frames("main").document.location ="index.asp?add=judge";
</script>
<% else %>
<html>
<head>
<title>添加衣食住行</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/eintrdemo.css">
</head>
<body bgcolor="#efefef" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
onLoad="javaScript:document.form.hname.focus()">
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.hname.value == "")
{
alert("请在 hname 域中输入值。");
theForm.hname.focus();
return (false);
}
if (theForm.hname.value.length > 50)
{
alert("在 hname 域中,请最多输入 50 个字符。");
theForm.hname.focus();
return (false);
}
if (theForm.city.value == "")
{
alert("请在 city 域中输入值。");
theForm.city.focus();
return (false);
}
if (theForm.city.value.length > 30)
{
alert("在 city 域中,请最多输入 30 个字符。");
theForm.city.focus();
return (false);
}
if (theForm.phone.value == "")
{
alert("请在 phone 域中输入值。");
theForm.phone.focus();
return (false);
}
if (theForm.phone.value.length > 30)
{
alert("在 phone 域中,请最多输入 30 个字符。");
theForm.phone.focus();
return (false);
}
if (theForm.address.value == "")
{
alert("请在 address 域中输入值。");
theForm.address.focus();
return (false);
}
if (theForm.address.value.length > 100)
{
alert("在 address 域中,请最多输入 100 个字符。");
theForm.address.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="post" action="" name="FrontPage_Form1" onsubmit="return FrontPage_Form1_Validator(this)">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr bgcolor="#4E5960">
<td class="heading"> <font color="#FFFFFF"><b>添加衣食住行</b></font></td>
</tr>
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolordark="#FFFFFF" bordercolor="#000000" height="122">
<tr>
<td width="12%" bgcolor="#BFBFBF" valign="top" height="26">宾馆名称</td>
<td width="88%" height="26">
<!--webbot bot="Validation" B-Value-Required="TRUE"
I-Maximum-Length="50" -->
<input type="text" name="hname" class="form" size="50" maxlength="50">
</td>
</tr>
<tr>
<td width="12%" bgcolor="bfbfbf" valign="top" height="26">所在城市</td>
<td width="88%" height="26">
<!--webbot bot="Validation" B-Value-Required="TRUE"
I-Maximum-Length="30" -->
<input type="text" name="city" class="form" size="30" maxlength="30">
</td>
</tr>
<tr>
<td width="12%" bgcolor="bfbfbf" valign="top" height="26">联系电话</td>
<td width="88%" height="26">
<!--webbot bot="Validation" B-Value-Required="TRUE"
I-Maximum-Length="30" -->
<input type="text" name="phone" class="form" size="30" maxlength="30">
</td>
</tr>
<tr>
<td width="12%" bgcolor="bfbfbf" valign="top" height="26">地址</td>
<td width="88%" height="26">
<!--webbot bot="Validation" B-Value-Required="TRUE"
I-Maximum-Length="100" -->
<input type="text" name="address" class="form" size="50" maxlength="100">
</td>
</tr>
<tr>
<td width="12%" bgcolor="bfbfbf" valign="top" height="26">备注</td>
<td width="88%" height="26">
<input type="text" name="remark" class="form" size="30">
</td>
</tr>
</table>
<div align="center"><br>
<a href="javascript:document.form.submit();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/sendarticle_on.gif',1)"><img name="Image1" border="0" src="images/sendarticle_off.gif" width="60" height="19" hspace="5"></a><a href="javascript:document.form.reset();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','images/rewrite_on.gif',1)"><img name="Image2" border="0" src="images/rewrite_off.gif" width="60" height="19" hspace="5"></a><a href="Javascript:window.close();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','images/close_2.gif',1)"><img name="Image3" border="0" src="images/close_1.gif" width="85" height="19" hspace="5"></a>
</div>
</form>
</body>
</html>
<% end if %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -