找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 450|回复: 2

[求助]怎样修改这个代码才能使登录密码为登录名的第一个字母+当天的年月日?

[复制链接]
发表于 2010-1-8 05:07:29 | 显示全部楼层 |阅读模式 IP:江苏扬州
<html>
<head>
<title>创建登录表单</title>
<script language="vbscript">
sub myok()
if form1.txtuname.value="zhang" and form1.pasukl.value="z and <% response.write date()%>" or form1.txtuname.value="wang" and form1.pasukl.value="w and <% response.write date()%>" then
alert("登录成功!")
else
alert("用户名或密码错误!")
form1.uname.focus()
end if
end sub
</script>
</head>
<body>
<form name="form1">
<table align="center" bgcolor="silver" width="300">
<tr bgcolor="#0038ff">
<th colspan="2" align="center">
<font color="white">登录表单</font></th>
</tr>
<tr>
<td width="80" height="30"align="center">登录名:</td>
<td><input type="text" name="txtuname" size="20"></td>
</tr>
<tr>
<td width="80" height="30" align="center">密码:</td>
<td><input type="password" name="pasukl" size="20"></td>
</tr>
<tr>
<td colspan=2 height="30"><center>&nbsp;
<input type="button" value="登录" name="btnok" onClick="myok()">&nbsp;&nbsp;
<input type="reset" value="重填" name="btnesc" ></center>
</td>
</tr>
</table>
</form>
</body>

我想把代码功能改为如果登录密码为第一个字母+当天的年月日,则显示登录成功,否则显示登录名或密码错误!有谁能帮我一下,谢谢了!
发表于 2010-1-8 05:07:32 | 显示全部楼层 IP:江苏扬州
不知道你使用的登录日期没有进行格式式,也就是说是怎么类型进行输入的是
是:2007-8-28 是:20070828 是怎么样的输入格式
但这里可以提示一下你的怎么做
你这里也就是要配套出一个密码:
username=request.form("username") : password=request.form("password")
'下面这样写请保证数据不为空先,我不写代码了
TablePass=""&left(username,1)&Date()&"" '这里配置出密码,

if password<>TablePass then
response.write "您输入的密码错误"
response.end
else
response.write "登录成功"
end if
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 11:23 , Processed in 0.358235 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表