半点优化网 http://www.bdxc.net/
当前位置首页 > 网站技术问题> 正文

asp登录界面源代码

2022-05-14 03:13:42 暂无评论 250 网站技术问题 源代码   界面   登录

default
<html>

<head>
<meta http-equiv=Content-Language content=zh-cn>
<meta http-equiv=Content-Type content=text/html; charset=gb2312>
<meta name=GENERATOR content=Microsoft FrontPage 4.0>
<meta name=ProgId content=FrontPage.Editor.Document>
<title>个人注册</title>
<script language=vbscript>
sub b1_onclick()
if len(trim(form1.t1.value))=0 then
msgbox请输入你的帐号!,0+48,提示
form1.t1.focus
elseif len(trim(form1.t2.value))=0 then
msgbox请输入你的密码!,0+48,提示
form1.t2.focus
else
if isnumeric(form1.t1.value)=true then
msgbox请输入汉字!,0+48,重输
form1.t1.focus
elseif len(trim(form1.t2.value))<3 or len(trim(form1.t2.value))>8 then
msgbox密码在3至8位之间!,0+48,重输
form1.t2.focus
else
window.open1.asp,new,toolbar=no,width=280,height=150,menubar=no,scrollbar=no,resizable=0
form1.submit
end if
end if
end sub
</script>
</head>
<body>
<p>yw9sky天地</p>

<form method=POST action=1.asp name=form1 target=new>
<p align=center><font size=6 color=#FF0000 face=隶书>个人注册</font></p>
<p align=center><font size=4>姓名:</font><input type=text name=t1 size=20></p>
<p align=center><font size=4>密码:</font><input type=password name=t2 size=20></p>
<p align=center><input type=button value=注册 name=B1><input type=reset value=重写 name=B2></p>
</form>

</body>

</html>

1.asp
<%@ language=vbscript %>
<%
dim x,y,num
num=0
x=request.form(t1)
y=request.form(t2)
response.cookies(user)(name)=x
response.cookies(user)(num)=num
response.cookies(user)(password)=y
response.cookies(user).expires=date()+365
%>

<html>

<head>
<title>信息确认</title>
</head>
<body>
<p>yw9sky天地</p>
<table border=0 width=100% id=table1 align=center cellspacing=1 bgcolor=#333399>
<tr bgcolor=#ffffff align=center>
<td colspan=2 width=100%>信息确认</td>
</tr>
<tr bgcolor=#ffffff align=center>
<td width=31%>姓名:</td>
<td width=69%><% = x %></td>
</tr>
<tr bgcolor=#ffffff align=center>
<td width=31%>密码:</td>
<td width=69%><% = y %></td>
</tr>
<tr bgcolor=#ffffff align=center>
<td colspan=2 width=100% align=center><a target=_blank href=2.asp>登录</a> 
<font onclick=window.close() style=cursor:hand>关闭</font></td>
</tr>
</table>

</body>
</html>

<%@ language=vbscript %>

<html>

<head>
<title>个人登录</title>
<script language=vbscript>
sub b1_onclick()
if len(trim(form1.t1.value))=0 then
msgbox请输入你的姓名!,0+48,提示
form1.t1.focus
elseif len(trim(form1.t2.value))=0 then
msgbox请输入你的密码!,0+48,提示
form1.t2.focus
else
if isnumeric(form1.t1.value)=true then
msgbox请输入汉字!,0+48,重输
form1.t1.focus
elseif len(trim(form1.t2.value))<3 or len(trim(form1.t2.value))>8 then
msgbox密码在3至8位之间!,0+48,重输
form1.t2.focus
else
form1.submit
end if
end if
end sub
</script>
</head>
<body>
<form method=POST action=3.asp name=form1 target=_blank>
<p align=center><font size=6 color=#FF0000 face=隶书>个人登录</font></p>
<p align=center><font size=4>姓名;</font><input type=text name=t1 size=20></p>
<p align=center><font size=4>密码:</font><input type=password name=t2 size=20></p>
<p align=center><input type=button value=开始登录 name=B1><input type=reset value=重新输入 name=B2></p>
</form>
</body>

</html>


3.asp
<% @ language=vbscript %>
<%
dim x,y,nm,pw
x=request.form(t1)
y=request.form(t2)
nm=requset.cookies(user)(name)
pw=requset.cookies(user)(password)
if nm<>x or pw<>y then
response.redirectdefault.htm
end if
%>
<%
dim num
num=request.cookies('user)(num)
if num=0 then
num=1
else
num=num+1
end if
response.cookies(user)(num)=num
%>

<html>

<head>

<title>欢迎来访yw9sky</title>
</head>
<body>
欢迎<% =nm %>第<% =num %>次登录
</body>

</html>


猜你喜欢