用户注册及跟踪代码(三)
程序员文章站
2022-04-19 21:41:48
2. asp代码(设立一dsn,请改动begin.)---------------------------------------文件reg_step2.asp<% vali...
2. asp代码(设立一dsn,请改动begin.)
----------------------------------
-----文件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">
----------------------------------
-----文件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">
上一篇: 用ASP制作在线测试