本地登录html源码(登录网站的源代码下载到本地)
本文目录一览:
求html登陆界面详细代码。要可以登陆,用数据库保存。
这是我曾经写过的一个登录页面的详细代码,供你参考,asp的代码,不知道你看得懂不?
文件名是:deafaule.asp
% @ Language=VBScript %
!--#include file="inc/jf.asp"--
html
head
title欢迎使用
%
Response.Write (JFrs("Company_Name") " —— " JFrs("Software_Name"))
Response.Cookies("Visiter")("Identification") = "ChunLeiSky" '设置cookies的标识,在后面检测浏览器是否支持cookies
Response.Cookies("Visiter").Expires = dateadd("n",10,now()) '设置cookies的有效期为10分钟
Dim an
Randomize
an= int((99999-11111+1) * RND +11111)
session("FrontPage_Yzm")=an
%
/title
meta http-equiv="Content-Type" content="text/html; charset=gb2312" /
meta http-equiv="Content-Language" content="zh-cn" /
link rel="stylesheet" type="text/css" href="main.css"
script language=VBScript src=load.js/script
script language="JavaScript"
function FrontPage_valid() {
if (document.FrontPage_Form.loginName.value == "") {
alert("请先输入 [用户名] !\n如果没有帐号请先 注册!");
document.FrontPage_Form.loginName.focus();
return false;
}
else if (document.FrontPage_Form.loginName.value.length 2) {
alert("在 [用户名] 中,请至少输入 2 个字符!");
document.FrontPage_Form.loginName.focus();
return false;
}
else if (document.FrontPage_Form.loginPassword.value == "") {
alert("请输入[密码]!");
document.FrontPage_Form.loginPassword.focus();
return false;
}
else if (document.FrontPage_Form.loginPassword.value.length 5) {
alert("在 [密码] 中,请至少输入 5 个字符!");
document.FrontPage_Form.loginPassword.focus();
return false;
}
else if (document.FrontPage_Form.FrontPage_Yzm.value == "") {
alert("请输入[验证码]!");
document.FrontPage_Form.FrontPage_Yzm.focus();
return false;
}
else if (document.FrontPage_Form.FrontPage_Yzm.value.length != 5) {
alert("在 [验证码] 中,请输入 5 位数字!");
document.FrontPage_Form.FrontPage_Yzm.focus();
return false;
}
else if (document.FrontPage_Form.FrontPage_Yzm.value.length == 5) {
var i=0,ch;
for (i=0;i5;i++) {
ch=document.FrontPage_Form.FrontPage_Yzm.value.charAt(i);
if (ch"0" || ch"9") {
alert("在 [验证码] 中,必须输入 5 位数字!");
document.FrontPage_Form.FrontPage_Yzm.focus();
return false;
break;
}
}
}
else {
return true;
}
}
function setfocus() {
document.FrontPage_Form.loginPassword.focus();
return;
}
/script
/head
script language="JavaScript"
if (screen.width == 1440) {
document.write("body background='images/bg750.jpg' onload='JavaScript:setfocus();'br /br /br /br /br /br /br /br /br /br /");
}
else if (screen.width == 1280) {
document.write("body background='images/bg660.jpg' onload='JavaScript:setfocus();'br /br /br /br /br /br /br /br /");
}
else {
document.write("body BGcolor='#5A7EDC' onload='JavaScript:setfocus();'br /br /br /br /br /br /br /");
}
/script
div align="center"
form method="post" action="login.asp" name="FrontPage_Form" onSubmit="JavaScript:return FrontPage_valid();"
table border="0" cellpadding="0" cellspacing="0" width="548" height="350" id="table11" background="images/log.jpg"
tr height="50"th colspan="4" class="5c8e-0fed-8783-b033 Fir"
% Response.Write (JFrs("Company_Name") " —— " JFrs("Software_Name")) %
/th/tr
tr height="36"th colspan="4" class="0fed-8783-b033-9a27 warning"
%
Dim ErrCode
ErrCode = request.QueryString("ErrCode")
If ErrCode = "-1" Then
Response.Write "li 您已成功修改账号信息,请等待管理员审核!"
ElseIf ErrCode = "0" Then
Response.Write "li 您的帐号已成功注册,请等待管理员审核!"
End If
If ErrCode = "7" Then
Response.Write "li [用户名] 不能为空,且至少2个汉字,最多10个汉字"
End If
If ErrCode = "8" Then
Response.Write "li [密码] 不能为空,且至少5个字符,最多20个字符"
End If
If ErrCode = "9" Then
Response.Write "li [验证码] 错误"
End If
If ErrCode = "10" Then
Response.Write "li [用户名] 未注册 或 [密码] 错误"
End If
If ErrCode = "20" Then
Response.Write "li 您的账号未通过审核,详情请咨询管理员"
End If
ErrCode = ""
%
/th/tr
tr height="37"th colspan="4" align="left"/th/tr
tr height="38"
td width="202"/td
td width="100" align="right"用户名:/td
td width="224" input type="text" name="loginName" style="width:160px;height:20px" maxlength="10" title="请输入用户名,至少2个汉字,最多10个汉字" value="% =request.Cookies("Visiter")("VisitName") %" onFocus="JavaScript:this.select();" onMouseOver="JavaScript:this.focus();" onClick="Javascript:this.value=''"/td
td width="22"/td
/tr
tr height="38"
td width="202"/td
td width="100" align="right"密 码:/td
td width="224" input type="password" name="loginPassword" style="width:160px;height:20px" maxlength="20" title="请输入密码,至少5个字符"/td
td width="22"/td
/tr
tr height="38"
td width="202"/td
td width="100" align="right"验证码:/td
td width="224" input name="FrontPage_Yzm" style="width:100px;height:20px" maxlength="5" title="请输入5位的验证码"
% Response.Write (" " an) %
/td
td width="22"/td
/tr
tr height="54"
td width="202"/td
th colspan="2" valign="middle"
input type="image" src="images/login.jpg"
a href="JavaScript:document.FrontPage_Form.reset();"img border="0" src="images/reset.jpg"/a
/th
td width="22"/td
/tr
tr height="34"
td width="202"/td
th colspan="2"如果您还没有帐号,请点此 a href="reg.asp?ErrCode=0"注册/a/th
td width="22"/td
/tr
tr height="25" class="8783-b033-9a27-3f5d Sec"
td width="202" align="center"% Response.Write (JFrs("Company") "® 版权所有 ") %
/td
th colspan="3"Copyright© 2012 All Rights Reserved/th
/tr
/table
/form
/div
script language="JavaScript"
if (screen.width == 1440) {
document.write("br /br /br /br /br /br /br /br /br /");
}
else if (screen.width == 1280){
document.write("br /br /br /br /");
}
else {
document.write("br /br /br /br /br /");
}
/script
center建议使用 IE8.0或更高版本的浏览器,推荐分辨率1440×900 或更高br /
%
Response.Write (JFrs("Company") "® " JFrs("Software_Name") " V1.0")
JFrs.Close
set JFrs = Nothing
CloseDataBase
%
/center
/body
/html
求一段用户登录html代码
html
head
title登陆页面/title
/head
form action="login_conf.jsp" method="post"
用户登陆
用户名:input type="text" name="uname"
密码: input type="password" name="upassword"
input type="submit" value="提交"
input type="reset" value="重置"
/form
/body
/html
****************************************************
验证页面jsp代码如下:
html
head
title用户验证页面/title
/head
h1 登陆范例-登陆成功 /h1
/html
不知道你用啥样的前台 是jsp还是asp.net或者是php
登录页面html代码
html xmlns=""head
meta http-equiv="Content-Type" content="text/html; charset=utf-8"
title贵美商城/title
link rel="stylesheet" type="text/css" href="css/global.css"
link rel="stylesheet" type="text/css" href="css/layout.css"
script type="text/javascript"
// snameCheck() passCheck()
function validateform(){
if(snameCheck() passCheck())
return true;
else
return false;
}
// Screen Name Validation
function snameCheck(){
var sname = document.getElementsByName("sname")[0].value;
var illegalChars = /\W/;
if(sname.length != 0){
if(illegalChars.test(sname)){
document.getElementById("passMsg").innerHTML.replace(/'会员名无效'/,'');
document.getElementById("passMsg").innerHTML='会员名无效';
document.getElementsByName("sname")[0].select();
return false;
}
}
else
{
document.getElementById("userMsg").innerHTML.replace(/'是否忘记输入会员名?'/,'');
document.getElementById("userMsg").innerHTML='是否忘记输入会员名?';
document.getElementsByName("sname")[0].focus();
return false
}
if(sname!=="zhangsan"){ //验证会员名必须为张三
document.getElementById("userMsg").innerHTML.replace(/'是否输入的会员名有错?'/,'');
document.getElementById("userMsg").innerHTML='是否输入的会员名有错?';
document.getElementsByName("sname")[0].focus();
return false;
}
return true;
}
function passCheck(){
var userpass = document.getElementsByName("pass")[0].value;
var illegalChars = /[\W_]/;// allow only charactors and numbers
// Check if Password field is blank.
if(userpass == ""){
document.getElementById("passMsg").innerHTML.replace(/'未输入密码 \n" + "请输入密码'/,'');
document.getElementById("passMsg").innerHTML='未输入密码 \n" + "请输入密码';
document.getElementsByName("pass")[0].focus();
return false;
}
// Check if password length is less than 6 charactor.
if(userpass.length 6){
document.getElementById("passMsg").innerHTML.replace(/'密码必须多于或等于 6 个字符。\n'/,'');
document.getElementById("passMsg").innerHTML='密码必须多于或等于 6 个字符。\n';
document.getElementsByName("pass")[0].focus();
return false;
}
//check if password contain illigal charactors.
else if(illegalChars.test(userpass)){
document.getElementById("passMsg").innerHTML.replace(/'密码包含非法字符'/,'');
document.getElementById("passMsg").innerHTML='密码包含非法字符';
document.getElementsByName("pass")[0].select();
return false;
}
if(userpass!=="123456"){ //验证密码必须为123456
document.getElementById("passMsg").innerHTML.replace(/'密码错误,请重新输入!'/,'');
document.getElementById("passMsg").innerHTML='密码错误,请重新输入!';
document.getElementsByName("pass")[0].focus();
return false;
}
return true;
}
/script
script type="text/javascript" charset="utf-8" src=""/script/head
body
div id="container"
iframe id="header" src="header.htm" width="980" height="136" frameborder="0" scrolling="no"/iframe
form action="login_success" method="post"
div class="b033-9a27-3f5d-e986 login"
ul class="9a27-3f5d-e986-ca9c form f_l"
h1img src="images/logintitle.gif" alt="会员登录"/h1
li class="3f5d-e986-ca9c-f84e login_list"label会员名:/labelinput type="text" name="login"(可包含 a-z、0-9 和下划线)/li
li class="e986-ca9c-f84e-b662 login_list"label密nbsp;nbsp;nbsp;码:/labelinput type="text" name="pwd"(至少包含 6 个字符)/li
li class="ca9c-f84e-b662-1b22 a_c"img src="images/login.gif" alt="登录"/li
li class="f84e-b662-1b22-a8a8 desc"δnbsp;nbsp;a href="#"什么是安全登录/a。/li
li class="b662-1b22-a8a8-4242 desc"δnbsp;nbsp;香港会员(繁体中文用户)由此a href="#"登入/a/li
li class="1b22-a8a8-4242-5bb2 desc"δnbsp;nbsp;a href="#"密码安全贴士/a。/li
li class="9729-1cb1-3ffa-212f desc"δnbsp;nbsp;防止病毒或者木马窃取您的账户信息,a href="#"在线检查/a您的电脑是否安全。/li
/ul
h1img src="images/register.gif" alt="注册会员"/h1
ul class="1cb1-3ffa-212f-5c8e aside f_l"
li class="3ffa-212f-5c8e-0fed regpic"span便宜有好货!/span超过7000万件商品任您选。/li
li class="212f-5c8e-0fed-8783 regpic regpic2"span买卖更安全!/span交易超安全。/li
li class="5c8e-0fed-8783-b033 regpic regpic3"span免费开网店!/span轻松赚钱交友。/li
li class="0fed-8783-b033-9a27 regpic regpic4"span超人气社区!/span彩活动每一天/li
li class="8783-b033-9a27-3f5d a_c"a href="#"img src="images/registernow.gif" alt="现在就注册"/a/li
ul class="b033-9a27-3f5d-e986 reged"
li class="9a27-3f5d-e986-ca9c regpic regpic5"您已经是会员?a href="#"由此登入/a/li
li class="3f5d-e986-ca9c-f84e regpic regpic6"繁体中文用户由此a href="#"注册/a/li
/ul
/ul
/div
/form
iframe id="footer" src="footer.htm" width="980" height="136" frameborder="0" scrolling="no"/iframe
/div !--container end--
div class="e986-ca9c-f84e-b662 _bd_ext_tip" style="visibility: hidden;"span class="ca9c-f84e-b662-1b22 _bd_ext_search"百度一下/spanspan class="f84e-b662-1b22-a8a8 _bd_ext_open"打开链接/spanspan class="b662-1b22-a8a8-4242 _bd_ext_copy"复制/span/div/body/html