我的一个页面代码出错请指点下好吗?
表单提交时提示出错了 <%
work=Request("work")
IF work="add" Then
set rs=server.createobject("adodb.recordset")
sql="select * from Dingdan"
rs.open sql,conn,3,3
rs.addnew '添加记录到数据表末端
rs("a1") = Request("a1")
rs("a2") = Request("a2")
rs("a3") = Request("a3")
rs("a4") = Request("a4")
rs("a5") = Request("a5")
rs("a6") = Request("a6")
rs("a7") = Request("a7")
rs("a8") = Request("a8")
rs("a9") = Request("a9")
rs("a10") = Request("a10")
rs("a11") = Request("a11")
rs("a12") = Request("a12")
rs("a13") = Request("a13")
rs("a14") = Request("a14")
rs("a15") = Request("a15")
rs("a16") = Request("a16")
rs("a17") = Request("a17")
rs("a18") = Request("a18")
rs("a23") = Request("a23")
rs("a24") = Request("a24")
rs("a25") = Request("a25")
rs("a26") = Request("a26")
rs("a27") = Request("a27")
rs.update '更新数据表记录
rs.close
set rs=nothing
Response.Write "<SCRIPT LANGUAGE='JavaScript'>"
Response.Write "alert('恭喜您!\n 您的资料已经提交成功!');"
Response.Write "window.location='service2.asp'"
Response.Write "</SCRIPT>"
end if
%>
<script LANGUAGE="JavaScript">
function check()
{
if (document.theForm.a1.value=="")
{
alert("加*项不可为空!")
document.theForm.a1.focus()
document.theForm.a1.select()
return
}
if (document.theForm.a2.value=="")
{
alert("加*项不可为空!")
document.theForm.a2.focus()
document.theForm.a2.select()
return
}
if (document.theForm.a3.value=="")
{
alert("加*项不可为空!")
document.theForm.a3.focus()
document.theForm.a3.select()
return
}
if (document.theForm.a4.value=="")
{
alert("加*项不可为空!")
document.theForm.a4.focus()
document.theForm.a4.select()
return
}
if (document.theForm.a5.value=="")
{
alert("加*项不可为空!")
document.theForm.a5.focus()
document.theForm.a5.select()
return
}
if (document.theForm.a6.value=="")
{
alert("加*项不可为空!")
document.theForm.a6.focus()
document.theForm.a6.select()
return
}
if (document.theForm.a7.value=="")
{
alert("加*项不可为空!")
document.theForm.a7.focus()
document.theForm.a7.select()
return
}
if (document.theForm.a8.value=="")
{
alert("加*项不可为空!")
document.theForm.a8.focus()
document.theForm.a8.select()
return
}
document.theForm.submit()
}
</SCRIPT>
<form name="theForm" method="post" action="?work=add">
<table width="95%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td height="20" colspan="4"> </td>
</tr>
<tr>
<td height="20" align="right"><div align="left">公司名称:</div></td>
<td><div align="left">
<input name="a1" type="text" id="a1" size=20>
</div></td>
<td><div align="left">业务类型:</div></td>
<td><div align="left">
<select name="a23">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from Lb_name"
rs.open sql,conn,1,1
do while Not rs.eof
%>
<option value="<%=rs("tb")%>"><%=rs("tb")%></option>
<%
rs.movenext
Loop
rs.close
set rs=nothing
%>
</select>
</div></td>
</tr>
<tr>
<td height="20" align="right"><div align="left">联 系 人:</div></td>
<td><div align="left">
<input type="text" name="a3" size=20 >
</div></td>
<td><div align="left">联系地址:</div></td>
<td><div align="left">
<input name="a4" type="text" id="a4" size=20>
</div></td>
</tr>
<tr>
<td align="right"><div align="left">移动电话:</div></td>
<td><div align="left">
<input name="a2" type="text" id="a2" size=20>
</div></td>
<td><div align="left">电子邮件:</div></td>
<td><div align="left">
<input name="a6" type="text" id="a6" size=20>
</div></td>
</tr>
<tr>
<td height="20" align="right"><div align="left">传真号码:</div></td>
<td><div align="left">
<input type="text" name="a7" size=20 >
</div></td>
<td height="20"><div align="left">联系电话:</div></td>
<td><div align="left">
<input type="text" name="a5" size=20 >
</div></td>
</tr>
<tr>
<td height="24" align="right"><div align="left">起运地:</div></td>
<td><div align="left">
<input type="text" name="a8" size=20 >
</div></td>
<td><div align="left">运输方式;</div></td>
<td nowrap>
<div align="left">
<select name="a24" id="a24">
<option selected>航空</option>
<option>铁路</option>
<option>公路</option>
<option>海运</option>
</select>
</div></td></tr>
<tr>
<td height="24" align="right"><div align="left">目的地:</div></td>
<td><div align="left">
<input type="text" name="a10" size=20 >
</div></td>
<td><div align="left">货物保险:</div></td>
<td><div align="left">
<input name="a9" type="radio" value="零担" checked>
零担
<input name="a92" type="text" size="10">
</div></td>
</tr>
<tr>
<td height="24" align="right"><div align="left">发货时间:</div></td>
<td><div align="left">
<input type="text" name="a11" size=20 >
</div></td>
<td><div align="left">货物规格:</div></td>
<td nowrap> <div align="left">
<select name="a26" id="select3">
<option>3吨以上</option>
<option selected>轻货</option>
<option>整车</option>
</select>
<input name="a26" type="text" id="a26" size="5">
</div></td>
</tr>
<tr>
<td height="24" align="right"><div align="left">货物名称:</div></td>
<td><div align="left">
<input type="text" name="a13" size=20 >
</div></td>
<td><div align="left">货物性质:</div></td>
<td>
<div align="left">
<select name="a27" id="a27">
<option selected>易碎品</option>
<option>普通物品</option>
<option>贵重物品</option>
<option>其它物品</option>
</select>
</div></td>
</tr>
<tr>
<td height="24" align="right" valign="top"><p align="left">货物重量:</p>
</td>
<td><p align="left">
<input type="text" name="a14" size=20 >
<input name="a14" type="text" id="a14" value="公斤" size="5">
</p>
</td>
<td><div align="left">货物体积:</div></td>
<td><p align="left">
<input name="a25" type="text" id="a25" size=20 >
</p>
</td>
</tr>
<tr>
<td height="24" align="right" valign="top"><div align="left">结算方式:</div></td>
<td colspan="3"><div align="left">
<input name="a15" type="radio" value="发货付费" checked>
发货付费
<input type="radio" name="a15" value="发货付部分费">
发货付部分费
<input type="radio" name="a15" value="货到付费">
货到付费</div></td>
</tr>
<tr>
<td height="24" align="right" valign="top"><p align="left">托运方式:</p>
</td>
<td colspan="3"><p align="left">
<input name="a16" type="radio" value="常温" checked>
常温
<input name="a16" type="radio" value="低温">
低温
<input name="a16" type="radio" value="一般">
一般
<input name="a16" type="radio" value="箱型">
箱型 </p>
</td>
</tr>
<tr>
<td height="24" align="right" valign="top"><div align="left">其它要求:</div></td>
<td colspan="3">
<div align="left">
<textarea name="a17" cols="40" rows="5"></textarea>
</div></td></tr>
<tr>
<td height="24" align="right" valign="top"><div align="left">备 注:</div></td>
<td colspan="3">
<div align="left">
<textarea name="a18" cols="40" rows="5"></textarea>
</div></td></tr>
<tr>
<td height="24" align="right" valign="top"> </td>
<td><input type="button" name="Submit2" value="提交" class="input" onClick="check()"></td>
<td><input type="reset" name="Submit3" value="重填" class="input"></td>