当前位置:首页 > 代码 > 正文

响应式登录页面代码(响应式登录页面代码是什么)

admin 发布:2022-12-19 22:24 151


本篇文章给大家谈谈响应式登录页面代码,以及响应式登录页面代码是什么对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

用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

如何写网页登陆界面的代码

这个是处理表单的页面,其实如果按照你说的,只有一个用户名的话,那就不用数据库咯。满简单的。

%

AdminName=request("AdminName")

Password=request("Password")

if AdminName"制作" then

response.write"SCRIPT language=JavaScriptalert('用户名不正确!');"

response.write"javascript:history.go(-1)/SCRIPT"

else

response.redirect"qindayuan.com/vcckxp/215165.htm"

end if

if Password"0123456789" then

response.write"SCRIPT language=JavaScriptalert('密码错误!');"

response.write"javascript:history.go(-1)/SCRIPT"

else

response.redirect"qindayuan.com/vcckxp/215165.htm"

end if

%

这样子你试试看,表单的用户名文本框name用AdminName表示,密码用password。试试看吧,如果你觉得这代码不好的话,不用评答案也行,我只是给你一个参考。

用户登录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

登录界面代码怎么写?

步骤一:登录页面总共分为四个部分。

第一部分: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

提示错误信息

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

关于响应式登录页面代码和响应式登录页面代码是什么的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/27506.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载