CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  ASP

用户登陆设置问题?急 。

楼主bbbpass()2006-07-01 15:06:14 在 Web 开发 / ASP 提问

<%@LANGUAGE="VBSCRIPT"   CODEPAGE="936"%>  
  <!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  <html   xmlns="http://www.w3.org/1999/xhtml">  
  <head>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312"   />  
  <title>无标题文档</title>  
  </head>  
   
  <body>  
  <form   id="form1"   name="form1"   method="post"   action="index.asp">  
      <p   align="center">用户名字  
          <label>  
          <input   name="username"   type="text"   id="username"   />  
          </label>  
      </p>  
      <p   align="center">用户密码      
          <label>  
          <input   name="userpsw"   type="text"   id="userpsw"   />  
          </label>  
      </p>  
      <p   align="center">  
          <label>  
          <input   type="reset"   name="Submit2"   value="清除"   />   &nbsp;&nbsp;  
          <input   type="submit"   name="Submit"   value="登陆"   />  
          </label>  
      </p>  
       
  </form>  
   
  </body>  
  </html>  
   
   
  就是这个东西想在这个页面写个/固定的密码验证的函数控制登陆index.asp  
  问题点数:100、回复次数:13Top

1 楼goga21cn()外城◣◥◣◥奔III的预备团员︻$▅▆▇◤()︻︼─一()回复于 2006-07-01 15:13:54 得分 0

沙发先Top

2 楼mumu1980()回复于 2006-07-01 15:16:48 得分 40

<%@LANGUAGE="VBSCRIPT"   CODEPAGE="936"%>  
  <!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  <html   xmlns="http://www.w3.org/1999/xhtml">  
  <head>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312"   />  
  <title>无标题文档</title>  
  </head>  
  <%action=request("action")  
  username=trim(request("username"))  
  userpwd=trim(request("userpwd))  
  if   action=do   then  
  if   username="aa"   and   userpwd="123456"   then  
  response.write("登陆成功!")  
  response.Redirect("index.asp")  
  else  
  response.write("用户名或密码错误!")  
  response.Redirect("登陆页")  
  end   if  
  end   if  
  %>  
  <body>  
  <form   id="form1"   name="form1"   method="post"   action="当前页名称?action=do">  
      <p   align="center">用户名字  
          <label>  
          <input   name="username"   type="text"   id="username"   />  
          </label>  
      </p>  
      <p   align="center">用户密码      
          <label>  
          <input   name="userpsw"   type="text"   id="userpsw"   />  
          </label>  
      </p>  
      <p   align="center">  
          <label>  
          <input   type="reset"   name="Submit2"   value="清除"   />   &nbsp;&nbsp;  
          <input   type="submit"   name="Submit"   value="登陆"   />  
          </label>  
      </p>  
       
  </form>  
   
  </body>  
  </html>Top

3 楼bbbpass()回复于 2006-07-01 15:16:55 得分 0

寒Top

4 楼bbbpass()回复于 2006-07-01 15:17:36 得分 0

我运行下能行结帖拉Top

5 楼bbbpass()回复于 2006-07-01 15:27:54 得分 0

<%@LANGUAGE="VBSCRIPT"   CODEPAGE="936"%>  
  <!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  <html   xmlns="http://www.w3.org/1999/xhtml">  
  <head>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312"   />  
  <title>无标题文档</title>  
  </head>  
  <%  
  action=request("action")  
  username=trim(request("username"))  
  userpwd=trim(request("userpwd"))  
  if   action=do   then  
  if   username="aa"   and   userpwd="aa"   then  
  response.write("登陆成功!")  
  response.Redirect("index.asp")  
  else  
  response.write("用户名或密码错误!")  
  response.Redirect("login.asp")  
  end   if  
  end   if  
  %>  
   
  <body>  
  <form   id="form1"   name="form1"   method="post"action="login.asp?action=do">  
      <p   align="center">用户名字  
          <label>  
          <input   name="username"   type="text"   id="username"   />  
          </label>  
      </p>  
      <p   align="center">用户密码      
          <label>  
          <input   name="userpsw"   type="text"   id="userpsw"   />  
          </label>  
      </p>  
      <p   align="center">  
          <label>  
          <input   type="reset"   name="Submit2"   value="清除"   />   &nbsp;&nbsp;  
          <input   type="submit"   name="Submit"   value="登陆"   />  
          </label>  
      </p>  
       
  </form>  
   
  </body>  
  </html>  
   
   
  HTTP   错误   500.100   -   内部服务器错误   -   ASP   错误  
  Internet   信息服务  
   
  --------------------------------------------------------------------------------  
   
  技术信息(用于支持人员)  
   
  错误类型:  
  Microsoft   VBScript   编译器错误   (0x800A03EA)  
  语法错误  
  /shu/login.asp,   line   12,   column   10  
  if   action=do   then  
  ---------^  
   
   
  浏览器类型:  
  Mozilla/4.0   (compatible;   MSIE   6.0;   Windows   NT   5.1;   SV1)    
   
  网页:  
  GET   /shu/login.asp    
   
   
  代码和错误。帮人帮到底   吧  
  Top

6 楼spook768(Prowriter)回复于 2006-07-01 15:34:57 得分 20

if   action="do"   thenTop

7 楼zhangjingcheng(ASP,JSP『学习者』)回复于 2006-07-01 15:53:55 得分 0

顶Top

8 楼zhangjingcheng(ASP,JSP『学习者』)回复于 2006-07-01 15:58:59 得分 20

<%@LANGUAGE="VBSCRIPT"   CODEPAGE="936"%>  
  <!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  <html   xmlns="http://www.w3.org/1999/xhtml">  
  <head>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312"   />  
  <title>无标题文档</title>  
  </head>  
  <%action=request("action")  
  username=trim(request("username"))  
  userpwd=trim(request("userpwd))  
  if   request("action")="do"   then  
   
  if   username="aa"   and   userpwd="123456"   then  
  response.write("登陆成功!")  
  response.Redirect("index.asp")  
  else  
  response.write("用户名或密码错误!")  
  response.Redirect("登陆页")  
  end   if  
  end   if  
  %>  
  <body>  
  <form   id="form1"   name="form1"   method="post"   action="?action=do">  
      <p   align="center">用户名字  
          <label>  
          <input   name="username"   type="text"   id="username"   />  
          </label>  
      </p>  
      <p   align="center">用户密码      
          <label>  
          <input   name="userpsw"   type="text"   id="userpsw"   />  
          </label>  
      </p>  
      <p   align="center">  
          <label>  
          <input   type="reset"   name="Submit2"   value="清除"   />   &nbsp;&nbsp;  
          <input   type="submit"   name="Submit"   value="登陆"   />  
          </label>  
      </p>  
       
  </form>  
   
  </body>  
  </html>  
  Top

9 楼zhangjingcheng(ASP,JSP『学习者』)回复于 2006-07-01 15:59:28 得分 0

这样就可以了啊Top

10 楼zys59(三仙半)回复于 2006-07-01 15:59:48 得分 0

这里节奏太快,刚看到,已经被解决了。  
  Top

11 楼zys59(三仙半)回复于 2006-07-01 16:08:52 得分 20

我测试了一下,就下面这句话改一下就行了。  
  userpwd=trim(request("userpwd))     少了一个引号,改成  
  userpwd=trim(request("userpwd"))就可以了  
   
  Top

12 楼bbbpass()回复于 2006-07-01 16:21:15 得分 0

<%@LANGUAGE="VBSCRIPT"   CODEPAGE="936"%>  
  <!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  <html   xmlns="http://www.w3.org/1999/xhtml">  
  <head>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312"   />  
  <title>无标题文档</title>  
  </head>  
  <%  
  action=request("action")  
  username=trim(request("username"))  
  userpwd=trim(request("userpwd"))  
  if   action="do"   then  
  if   username="aa"   and   userpwd="aa"   then  
  response.write("登陆成功!")  
  response.Redirect("index.asp")  
  else  
  response.write("用户名或密码错误!")  
  response.Redirect("login.asp")  
  end   if  
  end   if  
  %>  
   
  <body>  
  <form   id="form1"   name="form1"   method="post"action="?action=do">    
      <p   align="center">用户名字  
          <label>  
          <input   name="username"   type="text"   id="username"   />  
          </label>  
      </p>  
      <p   align="center">用户密码      
          <label>  
          <input   name="userpsw"   type="text"   id="userpsw"   />  
          </label>  
      </p>  
      <p   align="center">  
          <label>  
          <input   type="reset"   name="Submit2"   value="清除"   />   &nbsp;&nbsp;  
          <input   type="submit"   name="Submit"   value="登陆"   />  
          </label>  
      </p>  
       
  </form>  
   
  </body>  
  </html>  
  这个是最终的运行。但在   login.asp   登陆不到。index.asp  
  密码也没有什么反映!  
  解决解决。各位都辛苦了。   100分也不够分   啊。  
  <form   id="form1"   name="form1"   method="post"action="?action=do">   提交出现问题了。?还是匝地。Top

13 楼bbbpass()回复于 2006-07-01 16:22:33 得分 0

问题虽然小。可是咱们的认真对待吧。Top

相关问题

关键词

得分解答快速导航

  • 帖主:bbbpass
  • mumu1980
  • spook768
  • zhangjingcheng
  • zys59

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo