用户注册页面.docx
《用户注册页面.docx》由会员分享,可在线阅读,更多相关《用户注册页面.docx(8页珍藏版)》请在冰豆网上搜索。
![用户注册页面.docx](https://file1.bdocx.com/fileroot1/2022-11/22/f98e6b0f-0d1f-4fb1-9bbe-0636fff9baa4/f98e6b0f-0d1f-4fb1-9bbe-0636fff9baa41.gif)
用户注册页面
ASP程序设计实验报告
实验题目:
制作一个用户注册页面
专业班级:
计科系**
姓名:
***
学号:
***
2013年4月12日
实验报告
实验类型__验证_实验室_软件实验室一__
一、实验题目
制作一个用户注册页面
二、实验目的和要求
熟悉并掌握VB脚本语言,包括数据类型,函数,过程,重点掌握VBscript对象和事件。
三、实验内容
制作一个用户注册页面。
四、实验代码
按顺序输入注册信息
—
SubWindows_Onload
Form1.xm.Focus
EndSub
Subxm_OnkeyPress
IfWindow.Event.Keycode=13Then
Form1.mm.Focus
EndIf
EndSub
Submm_OnkeyPress
IfWindow.Event.Keycode=13Then
Form1.qrmm.Focus
EndIf
EndSub
Subqrmm_OnkeyPress
IfWindow.Event.Keycode=13Then
Form1.nl.Focus
EndIf
EndSub
Subnl_OnkeyPress
IfWindow.Event.Keycode=13Then
Form1.dh.Focus
EndIf
EndSub
Subdh_OnkeyPress
IfWindow.Event.Keycode=13Then
Form1.zz.Focus
EndIf
EndSub
Subzz_OnkeyPress
IfWindow.Event.Keycode=13Then
Form1.email.Focus
EndIf
EndSub
Subemail_OnkeyPress
IfWindow.Event.Keycode=13Then
Form1.button1.Focus
EndIf
EndSub
Subbutton1_OnClick
Dimtxt1,txt2,txt3,txt4,txt5,txt6,txt7,alltxt
txt1=Form1.xm.value
txt2=Form1.nl.value
txt3=Form1.dh.value
txt4=Form1.zz.value
txt5=Form1.mm.value
txt6=Form1.qrmm.value
txt7=Form1.email.value
Iftxt1=""Then
MsgBox"姓名不能为空!
"
Form1.xm.Focus
ExitSub
EndIf
Iftxt5=""Then
MsgBox"密码不能为空!
"
Form1.mm.Focus
ExitSub
EndIf
IfLen(txt5)<6orLen(txt5)>12Then
MsgBox"密码应该在6到12位之间."
Form1.mm.Focus
ExitSub
EndIf
Iftxt6=""Then
MsgBox"确认密码不能为空!
"
Form1.qrmm.Focus
ExitSub
EndIf
Iftxt5<>txt6Then
MsgBox"密码和确认密码不同!
"
Form1.qrmm.Focus
ExitSub
EndIf
Iftxt3=""Then
MsgBox"电话不能为空!
"
Form1.dh.Focus
ExitSub
EndIf
IfnotisNumeric(txt2)Then
MsgBox"请输入数字!
"
Form1.mm.Focus
ExitSub
EndIf
If(InStr("@",txt7)=0andInStr(".",txt7)=0)Then
MsgBox"请输入有效的E-mail地址!
"
Form1.email.Focus
ExitSub
EndIf
alltxt="姓名为:
"+txt1+VbCrlf
alltxt=alltxt+"密码为:
"+txt5+VbCrlf
alltxt=alltxt+"年龄为:
"+txt2+VbCrlf
alltxt=alltxt+"电话为:
"+txt3+VbCrlf
alltxt=alltxt+"住址为:
"+txt4
Intb=MsgBox(alltxt,4+32,"确认提交")
ifIntb=6then
form1.submit
endIf
endsub
subbutton1_onkeypress
ifwindow.event.keycode=13then
button1_onclik
endif
endsub
-->
姓名:
密码:
确认密码:
年龄:
电话:
住址:
email: