精美登录界面源代码模板(登录页面源代码)[20240505更新]
admin 发布:2024-05-05 22:07 140
今天给各位分享精美登录界面源代码模板的知识,其中也会对登录页面源代码进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!
本文目录一览:
- 1、jsp登陆界面源代码
- 2、求一个android 登录界面源码,美观漂亮的
- 3、用html代码编写一个简单的登陆界面
- 4、用ASP制作登陆页面的代码
- 5、求一个简单用ASP.NET用户登录界面的源代码
- 6、html网页设计:一个简单的登录界面代码!
jsp登陆界面源代码
1、login.jsp文件
%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%
%@ page import="java.util.*" %
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
html
head
title登录页面/title
/head
body
form name="loginForm" method="post" action="judgeUser.jsp"
table
tr
td用户名:input type="text" name="userName" id="userName"/td
/tr
tr
td密码:input type="password" name="password" id="password"/td
/tr
tr
tdinput type="submit" value="登录" style="background-color:pink" input
type="reset" value="重置" style="background-color:red"/td
/tr
/table
/form
/body
/html
2、judge.jsp文件
%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%
%@ page import="java.util.*" %
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
html
head
title身份验证/title
/head
body
%
request.setCharacterEncoding("GB18030");
String name = request.getParameter("userName");
String password = request.getParameter("password");
if(name.equals("abc") password.equals("123")) {
3、afterLogin.jsp文件
%
jsp:forward page="afterLogin.jsp"
jsp:param name="userName" value="%=name%"/
/jsp:forward
%
}
else {
%
jsp:forward page="login.jsp"/
%
}
%
/body
/html
%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
html
head
title登录成功/title
/head
body
%
request.setCharacterEncoding("GB18030");
String name = request.getParameter("userName");
out.println("欢迎你:" + name);
%
/body
/html
扩展资料:
java web登录界面源代码:
1、Data_uil.java文件
import java.sql.*;
public class Data_uil
{
public Connection getConnection()
{
try{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
}catch(ClassNotFoundException e)
{
e.printStackTrace();
}
String user="***";
String password="***";
String url="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=***";
Connection con=null;
try{
con=DriverManager.getConnection(url,user,password);
}catch(SQLException e)
{
e.printStackTrace();
}
return con;
}
public String selectPassword(String username)
{
Connection connection=getConnection();
String sql="select *from login where username=?";
PreparedStatement preparedStatement=null;
ResultSet result=null;
String password=null;
try{
preparedStatement=connection.prepareStatement(sql);
preparedStatement.setString(1,username);
result=preparedStatement.executeQuery();//可执行的 查询
if(result.next())
password=result.getString("password");
}catch(SQLException e){
e.printStackTrace();
}finally
{
close(preparedStatement);
close(result);
close(connection);
}
System.out.println("找到的数据库密码为:"+password);
return password;
}
public void close (Connection con)
{
try{
if(con!=null)
{
con.close();
}
}catch(SQLException e)
{
e.printStackTrace();
}
}
public void close (PreparedStatement preparedStatement)
{
try{
if(preparedStatement!=null)
{
preparedStatement.close();
}
}catch(SQLException e)
{
e.printStackTrace();
}
}
public void close(ResultSet resultSet)
{
try{
if(resultSet!=null)
{
resultSet.close();
}
}catch(SQLException e)
{
e.printStackTrace();
}
}
}
2、login_check.jsp:文件
%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%
!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""
html
head
meta http-equiv="Content-Type" content="text/html; charset=utf-8"
title验证用户密码/title
/head
body
jsp:useBean id="util" class="util.Data_uil" scope="page" /
%
String username=(String)request.getParameter("username");
String password=(String)request.getParameter("password");
if(username==null||"".equals(username))
{
out.print("script language='javaScript' alert('用户名不能为空');/script");
response.setHeader("refresh", "0;url=user_login.jsp");
}
else
{
System.out.println("输入的用户名:"+username);
String passwordInDataBase=util.selectPassword(username);
System.out.println("密码:"+passwordInDataBase);
if(passwordInDataBase==null||"".equals(passwordInDataBase))
{
out.print("script language='javaScript' alert('用户名不存在');/script");
response.setHeader("refresh", "0;url=user_login.jsp");
}
else if(passwordInDataBase.equals(password))
{
out.print("script language='javaScript' alert('登录成功');/script");
response.setHeader("refresh", "0;url=loginSucces.jsp");
}
else
{
out.print("script language='javaScript' alert('密码错误');/script");
response.setHeader("refresh", "0;url=user_login.jsp");
}
}
%
/body
/html
3、loginSucces.jsp文件
%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%
!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""
html
head
meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
titleInsert title here/title
/head
body
hr size="10" width="26%" align="left" color="green"
font size="6" color="red" 登录成功 /font
hr size="10" width="26%" align="left" color="green"
/body
/html
4、user_login.jsp文件
%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%
!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""
html
head
meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
title登录界面/title
/head
body background="C:\Users\win8\workspace\Login\image\9dcbdc339e72a5663b5c289fb5573c13_10.jpg"
center
brbrbrbrbrbr
h1 style="color:yellow"Login/h1
br
form name="loginForm" action="login_check.jsp" method="post"
table Border="0"
tr
td账号/td
tdinput type="text" name="username"/td
/tr
tr
td密码/td
tdinput type="password" name="password"
/td
/tr
/table
br
input type="submit" value="登录" style="color:#BC8F8F"
/form
/center
/body
/html
求一个android 登录界面源码,美观漂亮的
还是自己搜一下吧,很多android开发论坛都有人提供源码下载的。比如仿QQ等等。
用html代码编写一个简单的登陆界面
!DOCTYPE htmlhtml lang="zh-CN"head
meta charset="utf-8"
meta http-equiv="X-UA-Compatible" content="IE=edge"
meta name="viewport" content="width=device-width, initial-scale=1"
title登录/title
link href="css/bootstrap.min.css" rel="stylesheet"/headbodynav class="navbar navbar-default"
div class="container-fluid"
div class="navbar-header"
a class="navbar-brand" href="./"jsp作业/a
/div
div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"
ul class="nav navbar-nav navbar-right"
lia href="login.html"登录/a/li
/ul
/div
/div/navdiv class="container"
div class="row"
div class="col-md-4"
/div
div class="col-md-4"
form class="form-signin" target="submitFrame" method="post"
h2 class="form-signin-heading"登录到jsp作业/h2
label for="inputEmail"Email/label
input type="email" id="inputEmail" class="form-control" placeholder="请输入Email" required autofocusbr
label for="inputPassword"密码/label
input type="password" id="inputPassword" class="form-control" placeholder="请输入密码" required
div class="checkbox"
label
input type="checkbox" value="remember-me" checked="checked" 记住密码 /label
/div
button type="submit" class="btn btn-primary" id="btn-login"登录/button
a href="reg.html" class="btn btn-default"注册/a
/form
iframe style="display: none;" name="submitFrame" src="about:blank"/iframe
/div
div class="col-md-4"
/div
/div
script src="js/jquery.min.js"/script/body/html
用ASP制作登陆页面的代码
时间关系,没给你写 所以就复制了一段 可到我论坛看看
代码如下:
1.connection.asp里的代码是:
%
set conn=server.createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source="server.MapPath("student.mdb")
%
2.yanzheng.asp里的代码是:
!--#include file="connection.asp"--
%
dim zhanghao,mima
zhanghao=request("zhanghao")
mima=request("mima")
if zhanghao="" then
%
script language=javascript
alert("帐号为空");
location.href="denglu.asp"
/script
% end if %
% if mima="" then
%
script language=javascript
alert("密码为空");
location.href="denglu.asp"
/script
% end if %
%set rs=server.createobject("adodb.recordset")
rs.open "select * from student where zhanghao='"zhanghao"'",conn,1,3
if not rs.eof then
if mima=rs("mima") then
session("zhanghao")=zhanghao
Response.write("scriptlocation.href('index.asp')/script" )
else
response.write ("scriptalert('用户密码错误');location.href('denglu.asp')/script")
end if
end if
if rs.eof then
response.write ("scriptalert('用户帐号错误');location.href('denglu.asp')/script")
end if
set rs=nothing
rs.close
%
二、
conn.asp
%
Set conn=Server.CreateObject("ADODB.Connection")
connstr="DBQ="+server.mappath("haha.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)}"
conn.Open connstr
%
index.asp
%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""
html
head
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
title无标题文档/title
/head
body
form name="form1" method="post" action="login.asp"
table width="50%" height="108" border="0" cellpadding="0" cellspacing="0"
tr
td用户名:/td
tdinput name="us" type="text" id="us"/td
/tr
tr
td密码:/td
tdinput name="pa" type="password" id="pa" value=""/td
/tr
tr
td /td
tdinput type="submit" name="Submit" value="提交"/td
/tr
/table
/form
/body
/html
login.asp
!--#include file="conn.asp"--
%
us=replace(request.form("us"),"'","’")
pa=replace(request.form("pa"),"'","’")
%
%
set rs=server.createobject("adodb.recordset")
sql="select * from haha where us='"us"' and pa='"pa"'"
rs.open sql,conn,1,1
%
%
if rs.eof or rs.bof then
response.write"密码错误~"
else
response.redirect"main.asp"
end if
%
三、
连接数据库(conn.asp)
%
dim db,conn,connstr
db="@data.mdb"
set Conn = server.CreateObject("ADODB.Connection")
connstr="provider=microsoft.jet.oledb.4.0;data source=" server.MapPath("../data/"db"")
conn.Open connstr
%
登录页面(login.asp)
% @language=vbscript %
!--#include file="conn.asp"--
%
On Error Resume Next
dim uid
dim pwd
uid=trim(request.Form("uid")) '获得用户名
pwd=trim(request.form("pwd")) '获得密码
dim rs
set rs=server.createobject("adodb.recordset")
if uid"" then
dim sqlstr
sqlstr="select uid,pwd from admin where uid='"replace(uid,"'","''")"' and pwd='"replace(pwd,"'","''")"'"
rs.open sqlstr,conn,3,1
if not rs.eof then
session("uid")=uid
response.redirect "login_ok.asp" '重定位url
else
response.redirect "error.htm"
end if
else
response.redirect "error.htm"
end if
%
求一个简单用ASP.NET用户登录界面的源代码
又是重置,js代码
团队的function reset(){
var slects = document.getElementsByTagName("input");
for (var i = 0; i slects.length; i++) {
if (slects[i].type.toLowerCase() == "text")
slects[i].value="";
}
}
重置所有的text控件
html网页设计:一个简单的登录界面代码!
!doctype html
html
head
meta charset="utf-8"
link href="main.css" type="text/css" rel="stylesheet"
title登陆界面/title
/head
body
div class="login_ico"
img src="images/login_ico.png"
/div
div class="login_putin"
ul
liinput type="text" /li
liinput type="password" /li
/ul
/div
div class="login_btn"
input type="submit" value="登陆"
/div
/body
/html
样式 :
*{
margin:0;
padding:0;}
li{
list-style-type:none;
margin:0;
padding:0;}
a{
text-decoration:none;
color:#000;}
/*---------------------按钮-----------------------------*/
.login_putin ul li input{
margin: 0;
width:70%;
padding: 1em 2em 1em 5.4em;
-webkit-border-radius:.3em;
-moz-border-radius: .3em;
border: 1px solid #999;
}
.login_btn{
width:300px;
margin:40px auto 0 auto;
}
.login_btn input{
width:100%;
margin:0;
padding:.5em 0;
-webkit-border-radius:.3em;
-moz-border-radius: .3em;
border:#1263be solid 1px;
background:#1b85fd;
color:#FFF;
font-size:17px;
font-weight:bolder;
letter-spacing:1em;
}
.login_btn input:hover{
background:#1263be;
}
关于精美登录界面源代码模板和登录页面源代码的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。
版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;
相关推荐
- 05-19网站设计模板,网站设计模板网站
- 05-18百度搜索引擎入口,百度搜索引擎入口登录
- 05-18网络营销案例具体分析,网络营销案例具体分析模板
- 05-18短视频营销推广方案,短视频营销推广方案模板
- 05-18企业网站模板,企业网站模板图片
- 05-17个人网页设计作品模板,个人网页设计与制作模板
- 05-17安徽省考试网官网,安徽省考试网官网入口登录
- 05-15产品推广网站,产品推广网站模板
- 05-13市场调研,市场调研报告模板
- 05-13神马推广登录,神马推广是什么
取消回复欢迎 你 发表评论:
- 标签列表
- 最近发表
- 友情链接