制作网站登录页面代码(网站登录代码怎么写)

本文目录
网站登录代码怎么写
yonghu=request.Form("yonghu")
mima= request.Form("mima")
SqlStr = "select * from Where yonghu="&yonghu&" and mima="& mima &" order by id desc"
Set Rs = Server.CreateObject("adodb.recordset")
Rs.Open SqlStr, Conn, 1, 1
IF Not(Rs.bof and Rs.EOF) Then
response.write("登陆成功")
Else
response.write("登陆失败")
End If
Rs.close
Set Rs = nothing
网页制作中登陆界面设计代码
《%@language=vbscript codepage=936 %》
《%
option explicit
’强制浏览器重新访问服务器下载页面,而不是从缓存读取页面
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
’主要是使随机出现的图片数字随机
%》
《html》
《head》
《title》管理员登录《/title》
《meta http-equiv="Content-Type" content="text/html; charset=gb2312"》
《link rel="stylesheet" href="Admin_Style.css"》
《script language=javascript》
function SetFocus()
{
if (document.Login.UserName.value=="")
document.Login.UserName.focus();
else
document.Login.UserName.select();
}
function CheckForm()
{
if(document.Login.UserName.value=="")
{
alert("请输入用户名!");
document.Login.UserName.focus();
return false;
}
if(document.Login.Password.value == "")
{
alert("请输入密码!");
document.Login.Password.focus();
return false;
}
//if (document.Login.CheckCode.value==""){
// alert ("请输入您的验证码!");
// document.Login.CheckCode.focus();
// return(false);
}
}
《/script》
《/head》
《body onLoad="SetFocus();"》
《p》 《/p》
《form name="Login" action="Admin_ChkLogin.asp" method="post" target="_parent" onSubmit="return CheckForm();"》
《table width="300" border="0" align="center" cellpadding="5" cellspacing="0" class="border" 》
《tr class="title"》
《td colspan="2" align="center"》 《strong》管理员登录《/strong》《/td》
《/tr》
《tr》
《td height="120" colspan="2" class="tdbg"》
《table width="250" border="0" cellspacing="8" cellpadding="0" align="center"》
《tr》
《td align="right"》用户名称:《/td》
《td》《input name="UserName" type="text" id="UserName2" size="23" maxlength="20"》《/td》
《/tr》
《tr》
《td align="right"》用户密码:《/td》
《td》《input name="Password" type="password" size="23" maxlength="20"》《/td》
《/tr》
《tr》
《td align="right"》验 证 码:《/td》
《td》《input name="CheckCode" size="15" maxlength="6"》
1109 《/td》
《/tr》
《tr》
《td colspan="2"》 《div align="center"》
《input type="submit" name="Submit" value=" 确认 "》
《input name="reset" type="reset" id="reset" value=" 清除 "》
《br》
《/div》《/td》
《/tr》
《/table》
《/td》
《/tr》
《/table》
《p align="center"》后台管理页面需要屏幕分辨率为 《font color="#FF0000"》《strong》1024*768《/strong》《/font》
或以上才能达到最佳浏览效果!《br》
需要浏览器为《strong》《font color="#FF0000"》 《/font》《/strong》《font color="#FF0000"》《strong》IE5.5《/strong》《/font》
或以上版本才能正常运行!!!《/p》
《/form》
《/body》
《/html》
登录界面代码怎么写
步骤一:登录页面总共分为四个部分。
第一部分:DIV整体布局。
第二部分:登录标题部分。
第三部分:用户名和密码输入框。
第四部分:网页布局样式。
步骤二:
div是所有DIV的样式。
div1是整体样式。
div2是登录标题样式。
div3是input输入框以及按键样式。
步骤三:用户名与密码输入框,其中内嵌样式 如:长、宽、边框、颜色。
步骤四:登录按钮以及重置,其中也有内嵌样式,与其上相同。
步骤五:登录页面效果图。
系统入口类中这样:
LoginFrame lf=new LoginFrame();
lf.setVisible(true);
LoginFrame
中,按钮“OK”的监听事件这样:
„„//连接数据库,并验证用户名和密码
if(success)//
验证成功
MainFrame mf=new MainFrame();
mf.setVisible(true);
dispose(); //
销毁
LoginFrame
else
提示错误信息
如何制作HTML网页登录 就是固定账号密码的那种 应该用代码就可以了吧
用PHP。
登录页面:
《html》
《head》《title》Login《/title》《/head》
《body》
《form action="login_page.php" method="GET"》
《label for="name"》Name: 《/label》《input type="text" name="name" /》
《label for="passwd"》Password: 《/label》《input type="password" name="passwd" /》
《button type="submit》Login《/button》
《/form》
《/body》
《/html》
登录后页面:
《?php
if(isset($_GET)) {
if($_GET == ’你设的密码’) {
print "登录成功!在此加入自定义输出";
}
}
?》
用ASP也类似。
用PHP做网站后台管理登陆界面详细代码
给你点思路,若是不懂的话你可以hi我。
第一步、新建一个form表单,用来提交用户名及密码
(action属性为你需要把数据提交到哪个页面。method属性为你的提交方式,这里使用post,下面两个input文本框一个是用户名,一个为密码。)
第二步、数据处理页面,使用传过来的值在数据表里面查询,看看是否有这条数据,若是没有就提示登录失败,若是有这条数据就把用户名存储到session里面,然后在index.html页面判断有没有session,若是有session的话就进入到index.html页面。

更多文章:
如何营销推广?如何组建营销团队,网络营销推广团队销售团队怎么组建
2026年5月11日 07:08
北京小型企业网站seo报价单:北京网站seo报价如何选择合适的方案
2026年6月10日 01:54
电商平台开发需求(开发一套电商平台多少钱_做一个电商平台的app多少钱)
2026年5月15日 22:15
谷歌seo推广公司德国排名优化技巧:谷歌seo推广公司德国哪家靠谱
2026年6月6日 00:00
小众电商平台(除了淘宝京东,国内还有那些相对小众而质量高的电商平台)
2026年5月11日 04:21















