各位坛友,我这有个页面无法提交数据,而且提交时连文本框都不检测,也就是必须要填的内容都不检测,数据库里也没有数据,麻烦各位给看一下,谢谢了!数据链接应该没有问题,所以觉得问题在代码上,我死活找不出哪儿错了,谢谢各位!
以下是源码:
<!--#include file="head.asp" -->
<SCRIPT language=javaScript>
function CheckJob()
{
if (document.form1.Quarters.value.length < 2 || document.form1.Quarters.value.length > 30){
alert ("提示:\n\n职位必须在2-30字之间!");
document.form1.Quarters.focus();
return false;
}
if (document.form1.Name.value.length < 2 || document.form1.Name.value.length > 16){
alert ("提示:\n\n姓名必须在2-16字之间!");
document.form1.Name.focus();
return false;
}
if (document.form1.Birthday.value.length!=10){
alert ("提示:\n\n出生日期格式不对!");
document.form1.Birthday.focus();
return false;
}
if (document.form1.Stature.value.length != 3){
alert ("提示:\n\n身高格式不对!");
document.form1.Stature.focus();
return false;
}
if (document.form1.Residence.value.length < 4 ||document.form1.Residence.value.length > 30 ){
alert ("提示:\n\n户籍所在地在4-30个符之间!");
document.form1.Residence.focus();
return false;
}
if (document.form1.Edulevel.value.length < 20 ){
alert ("提示:\n\n教育经历必须在20字以上!");
document.form1.Edulevel.focus();
return false;
}
if (document.form1.Experience.value.length < 20 ){
alert ("提示:\n\n工作经历必须在20字以上!");
document.form1.Experience.focus();
return false;
}
if (document.form1.Phone.value == "" || document.form1.Phone.value.length < 8){
alert ("提示:\n\n联系电话必须在8个字符以上!");
document.form1.Phone.focus();
return false;
}
if(document.form1.Email.value.length!=0)
{
if (document.form1.Email.value.charAt(0)=="." ||
document.form1.Email.value.charAt(0)=="@"||
document.form1.Email.value.indexOf('@', 0) == -1 ||
document.form1.Email.value.indexOf('.', 0) == -1 ||
document.form1.Email.value.lastIndexOf("@")==document.form1.Email.value.length-1 ||
document.form1.Email.value.lastIndexOf(".")==document.form1.Email.value.length-1)
{
alert("Email地址格式不正确!");
document.form1.Email.focus();
return false;
}
}
else
{
alert("Email不能为空!");
document.form1.Email.focus();
return false;
}
}
</SCRIPT>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="778" height="50" bgcolor="#EFEFE7">
<tr>
<td width="218" valign="top">
<% call Gaobei_userlogin() %>
<% 'Call Gaobei_Marquee() %>
<% call Gaobei_Search() %>
<% 'call Gaobei_vote() %>
</td>
<td width="560" valign="top">
<%
function ChangeChr(str)
ChangeChr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"<br>")," "," ")
end function
%>
<%
dim action,Quarters
Quarters=trim(request.QueryString("Quarters"))
action=trim(request.QueryString("action"))
if action="add" then
Quarters=trim(request.Form("Quarters"))
Uname=trim(request.Form("Name"))
Sex=trim(request.Form("Sex"))
Marry=trim(request.Form("Marry"))
Birthday=trim(request.Form("Birthday"))
Stature=trim(request.Form("Stature"))
School=trim(request.Form("School"))
Studydegree=trim(request.Form("Studydegree"))
Specialty=trim(request.Form("Specialty"))
Gradyear=trim(request.Form("Gradyear"))
Residence=trim(request.Form("Residence"))
Edulevel=trim(request.Form("Edulevel"))
Edulevel=trim(ChangeChr(Edulevel))
Experience=trim(request.Form("Experience"))
Experience=trim(ChangeChr(Experience))
Phone=trim(request.Form("Phone"))
Mobile=trim(request.Form("Mobile"))
Email=trim(request.Form("Email"))
Add=trim(request.Form("Add"))
Postcode=trim(request.Form("Postcode"))
'=================================
set rs=server.createobject("adodb.recordset")
sql="select * from HrDemandAccept where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("Quarters")=Quarters
rs("name")=Uname
rs("Sex")=Sex
rs("Marry")=Marry
rs("Birthday")=Birthday
rs("Stature")=Stature
rs("School")=School
rs("Studydegree")=Studydegree
rs("Specialty")=Specialty
rs("Gradyear")=Gradyear
rs("Residence")=Residence
rs("Experience")=Experience
rs("Edulevel")=Edulevel
rs("Experience")=Experience
rs("Phone")=Phone
rs("Mobile")=Mobile
rs("Email")=Email
rs("Add")=Add
rs("Postcode")=Postcode
rs("Adddate")=date()
rs.update
rs.close
set rs=nothing
response.write"<SCRIPT language=JavaScript>alert('您的简历提交成功,如果合适我们会尽快通知您面试!');"
response.write"javascript:history.go(-2)</SCRIPT>"
else
%>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="550" height="20" id="table1" background="images/skin/gongyong550.gif">
<tr>
<td width="432" style="FILTER: DropShadow(Color=#ffffff, OffX=1, OffY=1, Positive=1); PADDING-TOP: 2px"> 您应聘的职位是:<%=Quarters%></td>
<td width="96"> </td>
<td width="22"> </td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="550" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="550" height="60" style="border: 1px solid #CECFCE">
<tr>
<td bgcolor="#FFFFFF" width="548" valign="top">
<form name="form1" method="post" onSubmit="return CheckJob()" action="HrDemandAccept.asp?action=add">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="540">
<tr>
<td width="541" height="10" valign="top" colspan="3"></td>
</tr>
<tr>
<td width="18" height="23" valign="top"><img border="0" src="Images/skin/ico.gif" width="12" height="11"></td>
<td width="84" height="23" valign="top">个人资料: </td>
<td width="439" height="23" valign="top">
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="437" height="284">
<tr>
<td width="68" valign="top">姓名:</td>
<td width="369" valign="top"><INPUT name="Name"></td>
</tr>
<tr>
<td valign="top" width="68">性别:</td>
<td valign="top" width="369"><select id="Sex" name="Sex">
<option value="男" selected>男</option>
<option value="女">女</option>
</select>
*</td>
</tr>
<tr>
<td valign="top" width="68">婚姻状况:</td>
<td valign="top" width="369"><SELECT id="Marry" name="Marry">
<OPTION value="未婚" selected>未婚</OPTION>
<OPTION value="已婚">已婚</OPTION></SELECT></td>
</tr>
<tr>
<td valign="top" width="68">出生日期:</td>
<td valign="top" width="369"><input name="Birthday"> *出生日期(如:1983-08-09)</td>
</tr>
<tr>
<td valign="top" width="68">身高:</td>
<td valign="top" width="369"><INPUT name="Stature" id="stature" size="15" maxlength="3"> *(cm)(如:填 168)</td>
</tr>
<tr>
<td valign="top" width="68">毕业院校:</td>
<td valign="top" width="369"><input name="School" size="40"></td>
</tr>
<tr>
<td valign="top" width="68">学历:</td>
<td valign="top" width="369"><input name="Studydegree" size="30" maxlength="50"></td>
</tr>
<tr>
<td valign="top" width="68">专业:</td>
<td valign="top" width="369"><input name="Specialty" size="30" maxlength="50"></td>
</tr>
<tr>
<td valign="top" width="68">毕业时间:</td>
<td valign="top" width="369"><input name="Gradyear" size="16"></td>
</tr>
<tr>
<td valign="top" width="68">户籍地:</td>
<td valign="top" width="369"><INPUT name=Residence id=Residence size=40 maxlength="50">*</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="18" height="23" valign="top"><img border="0" src="Images/Guide.gif" width="12" height="11"></td>
<td width="84" height="23" valign="top">教育经历:</td>
<td width="439" height="23">
<TEXTAREA id=Edulevel name=Edulevel rows=12 cols=60></TEXTAREA></td>
</tr>
<tr>
<td width="541" height="10" valign="top" colspan="3"></td>
</tr>
<tr>
<td width="18" height="23" valign="top"><img border="0" src="Images/skin/ico.gif" width="12" height="11"></td>
<td width="84" height="23" valign="top">工作经历:</td>
<td width="439" height="23">
<TEXTAREA id=Experience name=Experience rows=12 cols=60></TEXTAREA></td>
</tr>
<tr>
<td width="541" height="10" valign="top" colspan="3"></td>
</tr>
<tr>
<td width="18" height="23" valign="top"><img border="0" src="Images/Guide.gif" width="12" height="11"></td>
<td width="84" height="23" valign="top">联系方式:</td>
<td width="439" height="23" valign="top">
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="436" height="138" id="table2">
<tr>
<td width="70" valign="top">联系电话:</td>
<td width="366" valign="top"><INPUT name=Phone id=Phone size="25">
* </td>
</tr>
<tr>
<td width="70" valign="top">手机号码:</td>
<td width="366" valign="top"><INPUT name=Mobile id=Mobile size="25"></td>
</tr>
<tr>
<td width="70" valign="top">E-mail:</td>
<td width="366" valign="top"><INPUT name=Email id=Email size="25"> *</td>
</tr>
<tr>
<td width="70" valign="top">通信地址:</td>
<td width="366" valign="top"><INPUT name=Add id=Add size=40></td>
</tr>
<tr>
<td width="70" valign="top">邮政编码:</td>
<td width="366" valign="top"><INPUT name=Postcode id=Postcode size=10 maxLength=6></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="541" height="28" valign="middle" colspan="3">
<p align="center"><input type="submit" name="submit" value=" 提交 " > <input type="reset" name="Submit8" value=" 重置 "></td>
</tr>
</form>
<tr>
<td width="541" height="10" valign="top" colspan="3"></td>
</tr>
<tr>
<td width="18" height="1" valign="top"></td>
<td width="84" height="1"></td>
</tr>
<% end if %>
</table>
</div>
</td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="550" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<!--#include file="foot.asp" -->