您现在的位置: 军旅同心-旅游自驾-军旅文学 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 正文
用户注册及跟踪代码(二)
作者:采集员 文章来源:来源于网络 点击数: 更新时间: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] 下一页


更多
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 网站地图 | 版权申明 | 网站公告 | 管理登录 |