打印本文 打印本文  关闭窗口 关闭窗口
用户注册及跟踪代码(二)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005/9/10 14:19:52
2. ASP代码(设立一DSN,请改动begin.asp)
----------------------------------
------文件begin.asp
<%
Set Con = Server.CreateObject( "ADODB.Connection" )
Con.Open "test" ,"test","test"
%>
-----文件reg_step1.asp
<html>
<head>
<title>会员注册--基本信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript1.1">
function verifyIt(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].n_pass.value.length<6){
    alert("密码不得少于6位")
    return false
    }
    if (document.forms[0].n_pass.value!=document.forms[0].nq_pass.value){
    alert("密码与确认密码不一致!")
    document.forms[0].n_pass.value=""
    document.forms[0].nq_pass.value=""
    return false;
    }
return true;
}
</SCRIPT>
</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>&nbsp;</td>
  </tr>
  <tr>
    <td>
      <table width="777" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="149" valign="top" >&nbsp; </td>
          <td width="628" valign="top">
            <table width="628" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="464" height="12" valign="top">&nbsp;</td>
                <td width="164" height="12" valign="top">&nbsp;</td>
              </tr>
              <tr>
                <td width="464" height="203" valign="top">
                  <table width="460" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="10" height="198" valign="top">&nbsp;</td>
                      <td width="450" height="198" valign="top" align="center" class="txt105">
                                       <form name="ord_1" action="reg_step1_sub.asp" onSubmit="return verifyIt(this)" method="post">
                          <table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
                            <tr align="center">
                              <td class="txt105" height="36"><font color="#336600">新会员注册-基本信息</font>
                                <hr size="1" align="left" color="#669999">
                              </td>
                            </tr>
                            <tr valign="top">
                              <td height="45">
                                <table width="400" border="0">
                                  <tr>
                                    <td width="150" class="txt105" align="right"><font color="#336600">用户名:</font></td>
                                    <td width="240" class="txt105">
                                      

<input type="text" name="n_name" class="txt9" size="20">
                                    </td>
                                  </tr>
                                  <tr>
                                    <td width="150" class="txt105" align="right"><font color="#336600">密码:</font></td>
                                    <td width="240" class="txt105">
                                      <input type="password" name="n_pass" class="txt9" size="20">
                  

[1] [2] [3] [4]  下一页



打印本文 打印本文  关闭窗口 关闭窗口