| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1154 人关注过本帖
标题:关于登陆的问题,在线等,跪求高手帮忙。
只看楼主 加入收藏
zzh820411
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-4-20
收藏
 问题点数:0 回复次数:12 
关于登陆的问题,在线等,跪求高手帮忙。
<link href="css/css1.css" rel="stylesheet" type="text/css">

<form id="form1" name="form1" method="post" onsubmit="return sclicklogin(this);" >
                      
<!--确认登录,开始! -->      
                <table width="378" height="188" border="0" align="center" class=9hao>
                 <tr>
                   <td>
                   

                   <table border="0" cellpadding="0" cellspacing="0" width="441">
                     <!-- fwtable fwsrc="未命名" fwbase="login.gif" fwstyle="Dreamweaver" fwdocid = "595789953" fwnested="0" -->
                     <tr>
                       <td><img src="login_pci/spacer.gif" width="59" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="73" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="31" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="15" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="44" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="24" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="9" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="15" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="35" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="136" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="1" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="10"><img src="login_pci/login_r1_c1.gif" alt="" name="login_r1_c1" width="441" height="99" border="0" id="login_r1_c1" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="99" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td rowspan="14"><img src="login_pci/login_r2_c1.gif" alt="" name="login_r2_c1" width="59" height="251" border="0" id="login_r2_c1" /></td>
                       <td colspan="7"><img src="login_pci/login_r2_c2.gif" alt="" name="login_r2_c2" width="211" height="11" border="0" id="login_r2_c2" /></td>
                       <td rowspan="12" colspan="2"><img src="login_pci/login_r2_c9.gif" alt="" name="login_r2_c9" width="171" height="194" border="0" id="login_r2_c9" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="11" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td><img src="login_pci/login_r3_c2.gif" alt="" name="login_r3_c2" width="73" height="24" border="0" id="login_r3_c2" /></td>
                       <td colspan="5" ><input name="name" type="text" class="STYLE2" size="15" maxlength="12" /></td>
                       <td rowspan="8"><img src="login_pci/login_r3_c8.gif" alt="" name="login_r3_c8" width="15" height="111" border="0" id="login_r3_c8" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="24" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="6"><img src="login_pci/login_r4_c2.gif" alt="" name="login_r4_c2" width="196" height="4" border="0" id="login_r4_c2" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="4" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td><img src="login_pci/login_r5_c2.gif" alt="" name="login_r5_c2" width="73" height="23" border="0" id="login_r5_c2" /></td>
                       <td colspan="5"><input name="password" type="password" class="STYLE2" size="16" maxlength="15" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="23" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="6"><img src="login_pci/login_r6_c2.gif" alt="" name="login_r6_c2" width="196" height="6" border="0" id="login_r6_c2" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="6" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td><img src="login_pci/login_r7_c2.gif" alt="" name="login_r7_c2" width="73" height="23" border="0" id="login_r7_c2" /></td>
                       <td colspan="5" class="STYLE2" ><input name="yzm" type="text" class="STYLE2" size="4" maxlength="4" />
                         对照下面输入</td>
                       <td><img src="login_pci/spacer.gif" width="1" height="23" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="6"><img src="login_pci/login_r8_c2.gif" alt="" name="login_r8_c2" width="196" height="6" border="0" id="login_r8_c2" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="6" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td rowspan="2"><img src="login_pci/login_r9_c2.gif" alt="" name="login_r9_c2" width="73" height="25" border="0" id="login_r9_c2" /></td>
                       <td colspan="2"><span class="STYLE2">
                         <%
                         if session("yzm")<>"OK" then
                           randomize
                           rnd_a=cint(rnd()*9)
                           rnd_b=cint(rnd()*9)
                           rnd_c=cint(rnd()*9)
                           rnd_d=cint(rnd()*9)
                           abcd=rnd_a&rnd_b&rnd_c&rnd_d
                          else
                           session("yzm")="OK"
                        
                          end if  
                            response.write ("<font size='3' color='Fuchsia'>"&abcd&"</font>")
                            
                       %>
                       </span></td>
                       <td rowspan="2" colspan="3"><img src="login_pci/login_r9_c5.gif" alt="" name="login_r9_c5" width="77" height="25" border="0" id="login_r9_c5" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="18" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="2"><img src="login_pci/login_r10_c3.gif" alt="" name="login_r10_c3" width="46" height="7" border="0" id="login_r10_c3" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="7" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="7"><img src="login_pci/login_r11_c2.gif" alt="" name="login_r11_c2" width="211" height="22" border="0" id="login_r11_c2" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="22" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="7" align="center" valign="middle" background="login_pci/login_r12_c2.gif"><label class="STYLE2">
                          <input type="checkbox" name="checkbox" value="checkbox" />
                       管理员  找回密码
                       
                       </label></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="27" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="7"><img src="login_pci/login_r13_c2.gif" alt="" name="login_r13_c2" width="211" height="23" border="0" id="login_r13_c2" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="23" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td rowspan="2" colspan="2"><img src="login_pci/login_r14_c2.gif" alt="" name="login_r14_c2" width="104" height="57" border="0" id="login_r14_c2" /></td>
                       <td colspan="2"><input name="face2" type="image" onclick="return sclicklogin(this)" src="login_pci/login_r14_c4.gif" border=0></td>
                       <td rowspan="2"><img src="login_pci/login_r14_c6.gif" alt="" name="login_r14_c6" width="24" height="57" border="0" id="login_r14_c6" /></td>
                       <td colspan="3"><input type="image" name="face" src="login_pci/login_r14_c7.gif" ></td>
                       <td rowspan="2"><img src="login_pci/login_r14_c10.gif" alt="" name="login_r14_c10" width="136" height="57" border="0" id="login_r14_c10" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="21" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="2"><img src="login_pci/login_r15_c4.gif" alt="" name="login_r15_c4" width="59" height="36" border="0" id="login_r15_c4" /></td>
                       <td colspan="3"><img src="login_pci/login_r15_c7.gif" alt="" name="login_r15_c7" width="59" height="36" border="0" id="login_r15_c7" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="36" border="0" alt="" /></td>
                     </tr>
                   </table>
                   </td>
                 </tr>
               </table>
  <!-- 用户登录结束  -->    
</form>


<script>
<!--
function sclicklogin(frm){
 with(from){
      
         if (name.value==""){
           alert('姓名不能为空!');
           account.focus();
           return(false);  
           }
        
        
        if (password.value==""); {
           alert('请输入密码!');
           accout.focus();
           return(false);
           }
           
         if (yzm.value=="");{
           alert('请输入验证码!');
           accout.focus()
           return(false);
           }
      }
  }
//-->
</script>

[[it] 本帖最后由 zzh820411 于 2008-4-20 10:27 编辑 [/it]]

aaaa.jpg (60.18 KB)
图片附件: 游客没有浏览图片的权限,请 登录注册


login.rar (35.12 KB)
搜索更多相关主题的帖子: 登陆 在线 
2008-04-20 10:08
zzh820411
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-4-20
收藏
得分:0 
还没做全。望请高人指教,并帮忙完善一下。谢谢先了!
2008-04-20 10:16
zzh820411
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-4-20
收藏
得分:0 
问题:我按了登录没什么反应只好像页面被刷新一下。不解。
2008-04-20 10:17
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
收藏
得分:0 
<form id="form1" name="form1" method="post" onsubmit="return sclicklogin(this);" >
action呢?
2008-04-20 10:21
zzh820411
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-4-20
收藏
得分:0 
我看了例题,不用action 直接调用自定议函数 sclicklogin(),不知这样行不行。
2008-04-20 10:23
zzh820411
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-4-20
收藏
得分:0 
帮忙看看。我这样做,改成什么样会更好点。我上传来给你看看。
2008-04-20 10:26
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
收藏
得分:0 
楼主只是做了一个提交表单,提交后的内容没有写出。
看来楼主不是太理解asp
2008-04-20 10:31
zzh820411
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-4-20
收藏
得分:0 
是的。还没做成。现在我只是对输入的用户名,密码,验证码,进行判断是否为空(按下登录的情况下)
你帮我下载我的那代码,帮我补补。

[[it] 本帖最后由 zzh820411 于 2008-4-20 10:45 编辑 [/it]]
2008-04-20 10:41
zzh820411
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-4-20
收藏
得分:0 
我做了修改,可到判断用户名这里,我进行不下去了。用户名这里我要怎么判断是不是管理员的用户名。
数据库:db1.dbo 表名:admin
请赐教!



<!--#include virtual="conn.asp"-->
<body onload="document.all.name.focus()"></body>


<% if request.form("name")="" then%>

<link href="css/css1.css" rel="stylesheet" type="text/css">


<form id="form1" name="form1" method="post" action="login.asp">
                      
<!--确认登录,开始! -->      
                <table width="378" height="188" border="0" align="center" class=9hao>
                 <tr>
                   <td>
                   

                   <table border="0" cellpadding="0" cellspacing="0" width="441">
                     <!-- fwtable fwsrc="未命名" fwbase="login.gif" fwstyle="Dreamweaver" fwdocid = "595789953" fwnested="0" -->
                     <tr>
                       <td><img src="login_pci/spacer.gif" width="59" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="73" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="31" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="15" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="44" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="24" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="9" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="15" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="35" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="136" height="1" border="0" alt="" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="1" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="10"><img src="login_pci/login_r1_c1.gif" alt="" name="login_r1_c1" width="441" height="99" border="0" id="login_r1_c1" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="99" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td rowspan="14"><img src="login_pci/login_r2_c1.gif" alt="" name="login_r2_c1" width="59" height="251" border="0" id="login_r2_c1" /></td>
                       <td colspan="7"><img src="login_pci/login_r2_c2.gif" alt="" name="login_r2_c2" width="211" height="11" border="0" id="login_r2_c2" /></td>
                       <td rowspan="12" colspan="2"><img src="login_pci/login_r2_c9.gif" alt="" name="login_r2_c9" width="171" height="194" border="0" id="login_r2_c9" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="11" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td><img src="login_pci/login_r3_c2.gif" alt="" name="login_r3_c2" width="73" height="24" border="0" id="login_r3_c2" /></td>
                       <td colspan="5" ><input name="name" type="text" class="STYLE2" size="16" maxlength="12" /></td>
                       <td rowspan="8"><img src="login_pci/login_r3_c8.gif" alt="" name="login_r3_c8" width="15" height="111" border="0" id="login_r3_c8" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="24" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="6"><img src="login_pci/login_r4_c2.gif" alt="" name="login_r4_c2" width="196" height="4" border="0" id="login_r4_c2" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="4" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td><img src="login_pci/login_r5_c2.gif" alt="" name="login_r5_c2" width="73" height="23" border="0" id="login_r5_c2" /></td>
                       <td colspan="5"><input name="password" type="password" class="STYLE2" size="16" maxlength="15" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="23" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="6"><img src="login_pci/login_r6_c2.gif" alt="" name="login_r6_c2" width="196" height="6" border="0" id="login_r6_c2" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="6" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td><img src="login_pci/login_r7_c2.gif" alt="" name="login_r7_c2" width="73" height="23" border="0" id="login_r7_c2" /></td>
                       <td colspan="5" class="STYLE2" ><input name="yzm" type="text" class="STYLE2" size="4" maxlength="4" />
                         对照下面输入</td>
                       <td><img src="login_pci/spacer.gif" width="1" height="23" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="6"><img src="login_pci/login_r8_c2.gif" alt="" name="login_r8_c2" width="196" height="6" border="0" id="login_r8_c2" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="6" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td rowspan="2"><img src="login_pci/login_r9_c2.gif" alt="" name="login_r9_c2" width="73" height="25" border="0" id="login_r9_c2" /></td>
                       <td colspan="2"><span class="STYLE2">
                         <%
                         if session("yzm")<>"OK" then
                           randomize
                           rnd_a=cint(rnd()*9)
                           rnd_b=cint(rnd()*9)
                           rnd_c=cint(rnd()*9)
                           rnd_d=cint(rnd()*9)
                           abcd=rnd_a&rnd_b&rnd_c&rnd_d
                          else
                           session("yzm")="OK"
                        
                          end if  
                            response.write ("<font size='3' color='Fuchsia'>"&abcd&"</font>")
                            
                       %>
                       </span></td>
                       <td rowspan="2" colspan="3"><img src="login_pci/login_r9_c5.gif" alt="" name="login_r9_c5" width="77" height="25" border="0" id="login_r9_c5" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="18" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="2"><img src="login_pci/login_r10_c3.gif" alt="" name="login_r10_c3" width="46" height="7" border="0" id="login_r10_c3" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="7" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="7"><img src="login_pci/login_r11_c2.gif" alt="" name="login_r11_c2" width="211" height="22" border="0" id="login_r11_c2" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="22" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="7" align="center" valign="middle" background="login_pci/login_r12_c2.gif"><label class="STYLE2">
                          <input name="checkbox" type="checkbox" value="ok" />
                       管理员  找回密码
                       
                       </label></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="27" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="7"><img src="login_pci/login_r13_c2.gif" alt="" name="login_r13_c2" width="211" height="23" border="0" id="login_r13_c2" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="23" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td rowspan="2" colspan="2"><img src="login_pci/login_r14_c2.gif" alt="" name="login_r14_c2" width="104" height="57" border="0" id="login_r14_c2" /></td>
                       <td colspan="2"><input name="face2" type="image" onclick="return sclicklogin(this)" src="login_pci/login_r14_c4.gif" border=0></td>
                       <td rowspan="2"><img src="login_pci/login_r14_c6.gif" alt="" name="login_r14_c6" width="24" height="57" border="0" id="login_r14_c6" /></td>
                       <td colspan="3"><input type="image" name="face" src="login_pci/login_r14_c7.gif" ></td>
                       <td rowspan="2"><img src="login_pci/login_r14_c10.gif" alt="" name="login_r14_c10" width="136" height="57" border="0" id="login_r14_c10" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="21" border="0" alt="" /></td>
                     </tr>
                     <tr>
                       <td colspan="2"><img src="login_pci/login_r15_c4.gif" alt="" name="login_r15_c4" width="59" height="36" border="0" id="login_r15_c4" /></td>
                       <td colspan="3"><img src="login_pci/login_r15_c7.gif" alt="" name="login_r15_c7" width="59" height="36" border="0" id="login_r15_c7" /></td>
                       <td><img src="login_pci/spacer.gif" width="1" height="36" border="0" alt="" /></td>
                     </tr>
                   </table>
                   </td>
                 </tr>
               </table>
  <!-- 用户登录结束  -->    
</form>
<%else%>
  <%if request.form("password")="" then'以下正确
      response.write("<script language=vbscript>"&"msgbox"&"""请输入密码!"""&"</script>")
      response.write("<script>history.go(-1)</script>")
    elseif request.form("yzm")="" then'以下正确
      response.write("<script language=vbscript>"&"msgbox"&"""请输入验证码!"""&"</script>")
      response.write("<script>history.go(-1)</script>")
    elseif request.form("checkbox")="ok" then'以下正确
      '查看amdin用户名是否存在或正确
      response.write("<script language=vbscript>"&"msgbox"&"""现在以管理员模式登录!"""&"</script>")
      aa=request.form("name")
      exec="select * from admin"
      rs.open exec,conn,1,1
      
        jls=conn.execute("select count(*) from admin").getstring
         response.write("<a>管理员记录数为:"&jls&"</a><p>")
       if gly=1 then'以下正确
             response.write("<script language=vbscript>"&"msgbox"&"""你输入的管理员不存在,请重输!"""&"</script>")
          response.write("<script>history.go(-1)</script>")  
       else'以下正确
       
             response.write("<script language=vbscript>"&"msgbox"&"""错误,请重输!"""&"</script>")
         response.write("<a>输入的用户名为:"&request.form("name")&"</a><p>")
                  response.write("<a>长度:"&len(request.form("name"))&"</a><p>")
         response.write("<a>admin_name:"&rs("admin_name")&"</a><p>")
                 response.write("<a>长度:"&len(rs("admin_name"))&"</a><p>")
         response.write("<a>gly="&gly&"</a><p>")
         response.write("是否为表尾"&rs.eof&"</a><p>")
      end if
              
      
      else'以下正确
      response.write("<script language=vbscript>"&"msgbox"&"""现在员工模式登录!"""&"</script>")
 
    end if%>

<%end if%>
2008-04-20 12:57
zzh820411
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-4-20
收藏
得分:0 
急啊。兄弟们。请帮帮我吧。
2008-04-20 12:58
快速回复:关于登陆的问题,在线等,跪求高手帮忙。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.039792 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved