html注册模板网页(html注册页面模板)

skyadmin 37 2023-01-09

本文目录一览:

网页的登录界面和注册页面一般是怎么编写用html

一般登录界面用html写

因为登录界面没有太多的花哨

一般很简单

只是一个框架

表单提交用

跳到一个jsp页面去处理

如果正确就跳转到你想要到的界面

jsp可以通过

会话

或cookie或上下文、url等把页面联系起来

数据库

一般用mysql

注册判断的地方用js联系数据库就可以了

很简单的

HTML模版

1、ASP文件中的代码

pencat=rs.Fields.Item("m_content").Value

pencat=replace(pencat,"t_title",n_title)

pencat=replace(pencat,"t_author",n_author)

pencat=replace(pencat,"t_content",n_content)

Set fso = Server.CreateObject("Scripting.FileSystemObject")

Set fout = fso.CreateTextFile(server.mappath(fpath "\" fname))

fout.WriteLine pencat

fout.close

2、如下给出要生成的网页模板:

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

/head

body topmargin=""0"" leftmargin=""0""

table border=""0"" width=""760"" height=""100%"" background=""background.jpg""

tr

td width=""752"" height=""10"" colspan=""3""

p align=""center""t_title

/td

/tr

tr

td width=""752"" height=""18"" colspan=""3""

div align=""center""

/div

div align=""center""

font size=""2""

作者:/fontfont color=""#990000""t_author/font

font size=""2""

加入时间:/fontfont color=""#990000""t_date/font

/div

/td

/tr

tr

td width=""15%"" height=""100%"" valign=""top""

/td

td width=""70%"" height=""100%"" valign=""top""

t_content

/td

td width=""15%"" height=""100%"" valign=""top""

/td

/tr

/table

/body

/html

3、解释

(1)pencat=rs.Fields.Item("m_content").Value

pencat为一个字符串变量。

rs.Fields.Item("m_content").Value就是如上2、网页模板的全部HTML字符

(2)pencat=replace(pencat,"t_title",n_title)

pencat=replace(pencat,"t_author",n_author)

pencat=replace(pencat,"t_content",n_content)

以上三句就是将字符串中的字串替换成为你所需要的内容,即ASP中动态获得的内容。

(3)Set fso = Server.CreateObject("Scripting.FileSystemObject")

Set fout = fso.CreateTextFile(server.mappath(fpath "\" fname))

fout.WriteLine pencat

fout.close

以上为将刚刚组合所得的网页代码写入文件的过程。第一句定义fso文件,第二句创建输出流文件,其中fpath为你想要存储的文件的路径,fname为文件名;后两句是将字符串写入文件和关闭输出流文件。

10分求一个比较漂亮的的模板

10个漂亮的表单,您可以点上面的链接获取源码,并且提供了一步步的教程教您如何设计。

HTML格式的网页模板怎么使用

images 放图片的

index.html 主页

style 修改样式

layout 网页布局框架

点 主页 就好了

给分吧,嘿嘿

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

以下为个人原创教学例子,任何人引用需注明出自百度知道用户am7972,楼主可供参考

该例子涵盖了文本框、密码框、下拉菜单、单选框、复选框及文本区的使用

同时在数据的使用方面涵盖了文本型、数值型、日期型、布尔型的使用

也涵盖了在会员信息入数据库前,进行严格的数据检查

不足处,JS验证还不是太完善,不过有服务端认证足够了

title会员注册/title

script type="text/javascript"

!--function CheckForm()

{

if(document.userinfo.username.value == "")

{ alert("请输入姓名,姓名不能为空!");

document.userinfo.username.focus();

return false;

}

if(document.userinfo.username.value.length 10)

{

alert("输入的姓名长度最多为10个字符!");

document.userinfo.username.focus();

return false;

}

}

//--/script

/head

body

table border="1" width="53%" bordercolorlight="#000000" cellspacing="0" id="table1" height="358" bordercolor="#000000" bordercolordark="#FFFFFF" cellpadding="0"

form method="POST" action="bb.asp" name="userinfo" onsubmit="return CheckForm();"

trtd colspan="2" height="37" p align="center"会员注员/td /tr

tr td width="37%" align="right"姓名:/td td width="61%" input type="text" name="username" value="libin" size="13" /td /tr

tr td width="37%" align="right"密码:/td td width="61%" input type="password" name="userPassword" size="20" value="123"/td /tr

tr td width="37%" align="right"性别:/td td width="61%"input type="radio" value="True" checked name="Sex"男 input type="radio" name="Sex" value="False"女/td /tr

tr td width="37%" align="right"生日:/td td width="61%" input type="text" name="userSR" size="11" value="1985-03-12"/td /tr

tr td width="37%" align="right"年龄:/td td width="61%"input type="text" name="userNL" size="9" value="13"/td /tr

tr td width="37%" align="right"爱好:/td td width="61%" input type="checkbox" name="ah" value="sw"上网 input type="checkbox" name="ah" value="ds" checked读书 input type="checkbox" name="ah" value="ty"体育/td /tr

tr td width="37%" align="right"上网方式:/td td width="61%"

select size="1" name="swfs" option selected value="bhsw"拨号上网/option option value="wxsw"无线上网/option option value="gxsw"光纤上网/option /select

/td /tr

tr td width="37%" align="right"个人简介:/td td width="61%"textarea rows="9" name="userGrjs" cols="34"/textarea/td /tr tr td colspan="2" height="38" p align="center"input type="submit" value="提交" name="B1" input type="reset" value="重置" name="B2"/td

/tr

/form

/table

====bb.asp的会员注册非法数据监测====

%

username = Request("username")

userPassword = Request("userPassword")

Sex = Request("Sex")

userSR = Request("userSR")

userNL = Request("userNL")

ah = Request("ah")

swfs = Request("swfs")

userGrjs = Request("userGrjs")

'判断数据合法性,绝对不能让非法数据进入系统

'判断姓名username合不合法,是否包含非法数据

username = Trim(username) '例如:" 张 三 "经过处理之后变成"张 三"

If username ="" Then

Response.write "姓名不能为空"

Response.End

End If

If Len(username)10 Then

Response.write "姓名字数不能超过10个字" 'Len("Z")=1 Len("国")=2

Response.End

End If

For i = 1 To Len(username)

q = Mid(username,i,1)

If InStr("!@#$%^*()_-+|?/"",.",q)0 Then

Response.write "姓名不能包含特殊符号!@#$%^*()_-+|?/"",."

Response.End

End If

Next

'判断密码合不合法,是否包含非法数据userPassword = Trim(userPassword)If userPassword ="" Then Response.write "密码不能为空" Response.EndEnd If

If Len(userPassword)20 Then

Response.write "密码字数不能超过20个字"

Response.End

End If

'判断密码合不合法,是否包含非法数据

Sex = Trim(Sex)

If Sex = "" Then

Response.write "性别不能为空"

Response.End

End If

If Sex "True" And Sex "False" Then

Response.write "性别不能为不男不女"

Response.End

End If

'判断生日合不合法,是否包含非法数据

userSR = Trim(userSR)

If userSR ="" Then

Response.write "生日不能为空"

Response.End

End If

If Len(userSR)8 Or Len(userSR)10 Then '例如:2012-6-3 2012-11-23

Response.write "你输入的生日字数不对,应为2012-6-3或2012-11-23格式"

Response.End

End If

If IsDate(userSR)=False Then

Response.write "你输入的生日格式不能转化为日期,请核实"

Response.End

End If

If DateDiff("yyyy",userSR,Date())1 Or DateDiff("yyyy",userSR,Date())200 Then

Response.write "根据你输入的生日你可能小于1岁或已经超过200岁了,请核查重新输入"

Response.End

End If

'判断年龄合不合法,是否包含非法数据userNL = Trim(userNL)If userNL ="" Then

Response.write "年龄不能为空"

Response.End

End If

If IsNumeric(userNL)=False Then

Response.write "你输入的年龄不能转化为数值,请核查"

Response.End

End If

userNL = CInt(userNL)

If userNL0 Or userNL200 Then

Response.write "你输入的年龄不能小于0岁或者大于200岁,请核查"

Response.End

End If

'判断爱好合不合法,是否包含非法数据ah = Trim(ah) '选择多个爱好则系统会用,分开 //测试

ah = Replace(ah," ","")

arrAh = Split(ah,",")

For i = LBound(arrAh) To UBound(arrAh)

If arrAh(i)"sw" And arrAh(i)"ds" And arrAh(i)"ty" Then

Response.write i "你选择的爱好有问题,请核查" arrAh(i)

Response.End

End If

Next

'判断上网方式合不合法,是否包含非法数据swfs = Trim(swfs)If swfs = "" Then

Response.write "上网方式不能为空"

Response.End

End If

If swfs"bhsw" And swfs"wxsw" And swfs"gxsw" Then

Response.write "你选择的上网方式有问题,请核查"

Response.End

End If

'判断个人简介是否为空,是否超出1000个字

userGrjs = Trim(userGrjs)

If userGrjs = "" Then

Response.write "个人简介不能为空"

Response.End

End If

If Len(userGrjs) 1000 Then

Response.write "个人简介不能超过1000个字"

Response.End

End If

Response.write "数据合法性检测通过"

%

====登陆的HTML代码可相信楼主参照会员注册代码应该没问题了====

html注册模板网页的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于html注册页面模板、html注册模板网页的信息别忘了在云尚网络www.ysfad.net进行查找喔。

上一篇:ae素材网站(ae模板网站)
下一篇:html新闻网站模板(新闻网站模板参考)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~