注册登陆页面HTML代码该怎么写?

html-css06

注册登陆页面HTML代码该怎么写?,第1张

以下为个人原创教学例子,任何人引用需注明出自百度知道用户am7972,楼主可供参考\x0d\x0a该例子涵盖了文本框、密码框、下拉菜单、单选框、复选框及文本区的使用\x0d\x0a同时在数据的使用方面涵盖了文本型、数值型、日期型、布尔型的使用\x0d\x0a也涵盖了在会员信息入数据库前,进行严格的数据检查\x0d\x0a不足处,JS验证还不是太完善,不过有服务端认证足够了\x0d\x0a会员注册\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a

会员注员 \x0d\x0a

姓名: \x0d\x0a
密码: \x0d\x0a
性别: 男 女 \x0d\x0a
生日: \x0d\x0a
年龄: \x0d\x0a
爱好: 上网读书 体育 \x0d\x0a
上网方式: \x0d\x0a 拨号上网 无线上网 光纤上网 \x0d\x0a \x0d\x0a
个人简介:

\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a====bb.asp的会员注册非法数据监测====\x0d\x0a0 Then\x0d\x0a Response.write "姓名不能包含特殊符号!@#$%^&*()_-+|?/"",." \x0d\x0a Response.End \x0d\x0a End If\x0d\x0aNext\x0d\x0a'判断密码合不合法,是否包含非法数据userPassword = Trim(userPassword)If userPassword ="" Then Response.write "密码不能为空" Response.EndEnd If\x0d\x0aIf Len(userPassword)>20 Then\x0d\x0a Response.write "密码字数不能超过20个字" \x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0a'判断密码合不合法,是否包含非法数据\x0d\x0aSex = Trim(Sex)\x0d\x0aIf Sex = "" Then\x0d\x0a Response.write "性别不能为空"\x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0aIf Sex "True" And Sex "False" Then\x0d\x0a Response.write "性别不能为不男不女"\x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0a'判断生日合不合法,是否包含非法数据\x0d\x0auserSR = Trim(userSR)\x0d\x0aIf userSR ="" Then\x0d\x0a Response.write "生日不能为空"\x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0aIf Len(userSR)10 Then '例如:2012-6-3 2012-11-23\x0d\x0a Response.write "你输入的生日字数不对,应为2012-6-3或2012-11-23格式" \x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0aIf IsDate(userSR)=False Then\x0d\x0a Response.write "你输入的生日格式不能转化为日期,请核实" \x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0aIf DateDiff("yyyy",userSR,Date())200 Then\x0d\x0a Response.write "根据你输入的生日你可能小于1岁或已经超过200岁了,请核查重新输入" \x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0a'判断年龄合不合法,是否包含非法数据userNL = Trim(userNL)If userNL ="" Then\x0d\x0a Response.write "年龄不能为空" \x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0aIf IsNumeric(userNL)=False Then\x0d\x0a Response.write "你输入的年龄不能转化为数值,请核查"\x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0auserNL = CInt(userNL)\x0d\x0aIf userNL200 Then\x0d\x0a Response.write "你输入的年龄不能小于0岁或者大于200岁,请核查"\x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0a'判断爱好合不合法,是否包含非法数据ah = Trim(ah) '选择多个爱好则系统会用,分开 //测试\x0d\x0aah = Replace(ah," ","")\x0d\x0aarrAh = Split(ah,",")\x0d\x0aFor i = LBound(arrAh) To UBound(arrAh)\x0d\x0a If arrAh(i)"sw" And arrAh(i)"ds" And arrAh(i)"ty" Then \x0d\x0aResponse.write i & "你选择的爱好有问题,请核查" & arrAh(i)\x0d\x0aResponse.End\x0d\x0aEnd If\x0d\x0aNext\x0d\x0a'判断上网方式合不合法,是否包含非法数据swfs = Trim(swfs)If swfs = "" Then\x0d\x0a Response.write "上网方式不能为空"\x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0aIf swfs"bhsw" And swfs"wxsw" And swfs"gxsw" Then\x0d\x0a Response.write "你选择的上网方式有问题,请核查"\x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0a'判断个人简介是否为空,是否超出1000个字\x0d\x0auserGrjs = Trim(userGrjs)\x0d\x0aIf userGrjs = "" Then\x0d\x0a Response.write "个人简介不能为空" \x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0aIf Len(userGrjs) > 1000 Then\x0d\x0a Response.write "个人简介不能超过1000个字"\x0d\x0a Response.End\x0d\x0aEnd If\x0d\x0aResponse.write "数据合法性检测通过"\x0d\x0a%>\x0d\x0a====登陆的HTML代码可相信楼主参照会员注册代码应该没问题了====

这是我曾经写过的一个登录页面的详细代码,供你参考,asp的代码,不知道你看得懂不?\x0d\x0a文件名是:deafaule.asp\x0d\x0a \x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a欢迎使用 \x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0afunction FrontPage_valid() {\x0d\x0a if (document.FrontPage_Form.loginName.value == "") {\x0d\x0a alert("请先输入 [用户名] !\n如果没有帐号请先 注册!")\x0d\x0a document.FrontPage_Form.loginName.focus()\x0d\x0a return false\x0d\x0a }\x0d\x0a else if (document.FrontPage_Form.loginName.value.length < 2) {\x0d\x0a alert("在 [用户名] 中,请至少输入 2 个字符!")\x0d\x0a document.FrontPage_Form.loginName.focus()\x0d\x0a return false\x0d\x0a }\x0d\x0a else if (document.FrontPage_Form.loginPassword.value == "") {\x0d\x0a alert("请输入[密码]!")\x0d\x0a document.FrontPage_Form.loginPassword.focus()\x0d\x0a return false\x0d\x0a }\x0d\x0a else if (document.FrontPage_Form.loginPassword.value.length < 5) {\x0d\x0a alert("在 [密码] 中,请至少输入 5 个字符!")\x0d\x0a document.FrontPage_Form.loginPassword.focus()\x0d\x0a return false\x0d\x0a }\x0d\x0a else if (document.FrontPage_Form.FrontPage_Yzm.value == "") {\x0d\x0a alert("请输入[验证码]!")\x0d\x0a document.FrontPage_Form.FrontPage_Yzm.focus()\x0d\x0a return false\x0d\x0a }\x0d\x0a else if (document.FrontPage_Form.FrontPage_Yzm.value.length != 5) {\x0d\x0a alert("在 [验证码] 中,请输入 5 位数字!")\x0d\x0adocument.FrontPage_Form.FrontPage_Yzm.focus()\x0d\x0a return false\x0d\x0a }\x0d\x0a else if (document.FrontPage_Form.FrontPage_Yzm.value.length == 5) {\x0d\x0a var i=0,ch\x0d\x0a for (i=0i\x0d\x0a \x0d\x0a
\x0d\x0a
\x0d\x0a用户名:\x0d\x0a \x0d\x0a\x0d\x0a \x0d\x0a
\x0d\x0a密 码:\x0d\x0a \x0d\x0a\x0d\x0a \x0d\x0a
\x0d\x0a验证码:\x0d\x0a \x0d\x0a \x0d\x0a\x0d\x0a\x0d\x0a \x0d\x0a
\x0d\x0a\x0d\x0a \x0d\x0a \x0d\x0a\x0d\x0a\x0d\x0a \x0d\x0a
\x0d\x0a如果您还没有帐号,请点此 注册\x0d\x0a\x0d\x0a \x0d\x0a
\x0d\x0a \x0d\x0a Copyright© 2012 All Rights Reserved\x0d\x0a \x0d\x0a \x0d\x0a \x0d\x0a\x0d\x0a\x0d\x0a if (screen.width == 1440) {\x0d\x0a document.write("








")\x0d\x0a }\x0d\x0a else if (screen.width == 1280){\x0d\x0a document.write("



")\x0d\x0a }\x0d\x0a else {\x0d\x0a document.write("




")\x0d\x0a }\x0d\x0a\x0d\x0a建议使用 IE8.0或更高版本的浏览器,推荐分辨率1440×900 或更高
\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a

如下参考:

1.首先,在您的计算机桌面上创建一个新文件夹,然后在该文件夹中创建一个新的文本文档。

2.然后用记事本双击打开文本文档,如下图所示,然后编写一个简单的HTML代码。

3.点击“另存为”功能选项,显示默认的“另存为”代码为ANSI。

4.我们将把编码和文件名更改回图中所示的图像并保存它。

5.然后回到新创建的文件夹,找到一个额外的HTML文件。

6.最后,使用浏览器打开HTML文件。结果如图所示。