2. ASP代码(设立一DSN,请改动begin.asp)
----------------------------------
-----文件reg_step2.asp
<%
ValidCodeLogin=Request.QueryString("VailCodeLogin")
u_name=Request.QueryString("name")
if ValidCodeLogin="" or u_name="" then
Response.Redirect "reg_step1.asp"
Response.end
end if
%>
<html>
<head>
<title>详细信息填写</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/lotsty1.css">
<SCRIPT LANGUAGE="JavaScript1.1">
function isPosInteger(inputVal) {
inputStr = inputVal.toString()
for (var i = 0; i < inputStr.length; i++) {
var oneChar = inputStr.charAt(i)
if (oneChar < "0" || oneChar > "9") {
return false
}
}
return true
}
function CheckForm(form) {
for (i = 0; i <document.forms[0].elements.length; i++) {
if (document.forms[0].elements[i].type == "text" && document.forms[0].elements[i].value == ""){
alert("所有内容必须填写!")
return false;
}
}
if (document.forms[0].email.value.indexOf("@")==-1 || document.forms[0].email.value.indexOf(".")==-1 || document.forms[0].email.value.indexOf("@.")!=-1 || document.forms[0].email.value=="" || document.forms[0].email.value==null || document.forms[0].email.value.indexOf("@")==0){
alert('E-mail未输入或格式有误,请查看!')
return false
}
if(!isPosInteger(document.forms[0].year.value)){
alert("年份必须是数字!")
return false
}
if(!isPosInteger(document.forms[0].month.value)){
alert("月份必须是数字!")
return false
}
if(!isPosInteger(document.forms[0].date.value)){
alert("日期必须是数字!")
return false
}
return true;
}
</SCRIPT>
<link rel="stylesheet" href="../css/sty1.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#333333">
<table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="46"> </td>
</tr>
<tr>
<td height="426">
<table width="777" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="149" valign="top" height="386"> </td>
<td width="628" valign="top" height="386">
<table width="620" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="474" height="12" valign="top"> </td>
<td width="146" height="12" valign="top"> </td>
</tr>
<tr>
<td width="474" valign="top" height="367">
<table width="474" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" valign="top" height="368"> </td>
<td width="462" valign="top" class="txt105" height="368">
<table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
<tr align="center">
<td width="100%" class="txt105" height="20"><font color="#006600">个人详细信息填写
</font></td>
</tr>
<tr valign="top">
<td width="100%" height="346">
<form method="post"action="reg_step2_sub.asp" onSubmit="return CheckForm(this)">
<table width="400" border="0" cellspacing="4" cellpadding="0" align="center">
<tr>
<td colspan="2" class="txt9">
<hr size="1" align="left" color="#669999">
</td>
</tr>
<tr>
<td width="111" class="txt9" align="right" valign="bottom"><font
----------------------------------
-----文件reg_step2.asp
<%
ValidCodeLogin=Request.QueryString("VailCodeLogin")
u_name=Request.QueryString("name")
if ValidCodeLogin="" or u_name="" then
Response.Redirect "reg_step1.asp"
Response.end
end if
%>
<html>
<head>
<title>详细信息填写</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/lotsty1.css">
<SCRIPT LANGUAGE="JavaScript1.1">
function isPosInteger(inputVal) {
inputStr = inputVal.toString()
for (var i = 0; i < inputStr.length; i++) {
var oneChar = inputStr.charAt(i)
if (oneChar < "0" || oneChar > "9") {
return false
}
}
return true
}
function CheckForm(form) {
for (i = 0; i <document.forms[0].elements.length; i++) {
if (document.forms[0].elements[i].type == "text" && document.forms[0].elements[i].value == ""){
alert("所有内容必须填写!")
return false;
}
}
if (document.forms[0].email.value.indexOf("@")==-1 || document.forms[0].email.value.indexOf(".")==-1 || document.forms[0].email.value.indexOf("@.")!=-1 || document.forms[0].email.value=="" || document.forms[0].email.value==null || document.forms[0].email.value.indexOf("@")==0){
alert('E-mail未输入或格式有误,请查看!')
return false
}
if(!isPosInteger(document.forms[0].year.value)){
alert("年份必须是数字!")
return false
}
if(!isPosInteger(document.forms[0].month.value)){
alert("月份必须是数字!")
return false
}
if(!isPosInteger(document.forms[0].date.value)){
alert("日期必须是数字!")
return false
}
return true;
}
</SCRIPT>
<link rel="stylesheet" href="../css/sty1.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#333333">
<table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="46"> </td>
</tr>
<tr>
<td height="426">
<table width="777" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="149" valign="top" height="386"> </td>
<td width="628" valign="top" height="386">
<table width="620" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="474" height="12" valign="top"> </td>
<td width="146" height="12" valign="top"> </td>
</tr>
<tr>
<td width="474" valign="top" height="367">
<table width="474" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" valign="top" height="368"> </td>
<td width="462" valign="top" class="txt105" height="368">
<table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
<tr align="center">
<td width="100%" class="txt105" height="20"><font color="#006600">个人详细信息填写
</font></td>
</tr>
<tr valign="top">
<td width="100%" height="346">
<form method="post"action="reg_step2_sub.asp" onSubmit="return CheckForm(this)">
<table width="400" border="0" cellspacing="4" cellpadding="0" align="center">
<tr>
<td colspan="2" class="txt9">
<hr size="1" align="left" color="#669999">
</td>
</tr>
<tr>
<td width="111" class="txt9" align="right" valign="bottom"><font