首页源码登录界面html源代码(html源码下载)

登录界面html源代码(html源码下载)

编程之家2026-05-271125次浏览

这篇文章给大家聊聊关于登录界面html源代码,以及html源码下载对应的知识点,希望对各位有所帮助,不要忘了收藏本站哦。

登录界面html源代码(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>

登录界面html源代码(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>

<td><input 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">

<title>Insert 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>

<br><br><br><br><br><br>

<h1 style="color:yellow">Login</h1>

<br>

<form name="loginForm" action="login_check.jsp" method="post">

<table Border="0">

<tr>

<td>账号</td>

<td><input type="text" name="username"></td>

</tr>

<tr>

<td>密码</td>

<td><input type="password" name="password">

</td>

</tr>

</table>

<br>

<input type="submit" value="登录" style="color:#BC8F8F">

</form>

</center>

</body>

</html>

vb用户怎么登录界面用户登陆的代码是多少

vb登陆程序源代码\x0d\x0a\x0d\x0a你可以这样做建一个模块在里面输入下列\x0d\x0aPublic conn As ADODB.Connection\x0d\x0aSub main()\x0d\x0a Set conn= New ADODB.Connection\x0d\x0a conn.ConnectionString="Provider=SQLOLEDB.1;Persist Security Info=False;" _\x0d\x0a+"User ID=sa;password=sa;Initial Catalog=您的数据库名;Data Source=127.0.0.1"\x0d\x0a conn.Open\x0d\x0afrom1.Show’登录界面\x0d\x0aEnd Sub\x0d\x0a\x0d\x0a再在登录界面“确定”下写入如下代码:\x0d\x0aPrivate Sub Command1_Click()\x0d\x0a If id.Text="" Then\x0d\x0a MsgBox"用户名不能为空!", vbOKOnly+ vbInformation,"友情提示"\x0d\x0a id.SetFocus\x0d\x0a Exit Sub\x0d\x0a End If\x0d\x0a If password.Text="" Then\x0d\x0a MsgBox"密码不能为空!", vbOKOnly+ vbInformation,"友情提示"\x0d\x0a password.SetFocus\x0d\x0a Exit Sub\x0d\x0a End If\x0d\x0a\x0d\x0a Dim strSQl As String\x0d\x0a strSQl="select* from Users where users_name='"& Trim$(id.Text)&"' and password='"& Trim$(password.Text)&"'"\x0d\x0a \x0d\x0a Dim str As New ADODB.Recordset\x0d\x0a Set str= New ADODB.Recordset\x0d\x0a str.CursorLocation= adUseClient\x0d\x0a str.Open strSQl, conn, adOpenStatic, adLockReadOnly\x0d\x0a \x0d\x0a With str\x0d\x0a If.State= adStateOpen Then.Close\x0d\x0a.Open strSQl\x0d\x0a If.EOF Then\x0d\x0a Try_times= Try_times+ 1\x0d\x0a If Try_times>= 3 Then\x0d\x0a MsgBox"您已经三次尝试进入本系统,均不成功,系统将自动关闭", vbOKOnly+ vbCritical,"警告"\x0d\x0a Unload Me\x0d\x0a Else\x0d\x0a MsgBox"对不起,用户名不存在或密码错误!", vbOKOnly+ vbQuestion,"警告"\x0d\x0a id.SetFocus\x0d\x0a id.Text=""\x0d\x0a password.Text=""\x0d\x0a End If\x0d\x0a Else\x0d\x0a \x0d\x0a Unload Me\x0d\x0a \x0d\x0a Form2.Show’登录进入的另一个界面\x0d\x0a \x0d\x0a End If\x0d\x0a End With\x0d\x0a\x0d\x0aEnd Sub

求QQ网页自动登录代码

源代码如下:

Dim WshShell, QQPath, QQselect

QQPath="c:\Progra~1\Tencent\QQ\CoralQQ.exe"

Set

WshShell=WScript.CreateObject("WScript.Shell")

WshShell.Run

QQPath

WScript.Sleep 2000

WshShell.AppActivate"QQ登录"

WshShell.SendKeys

"+{TAB}"

WshShell.SendKeys"123456789"

WScript.Sleep 200

WshShell.SendKeys

"{TAB}"

WshShell.SendKeys"123456789"

WScript.Sleep 200

WshShell.SendKeys

"{ENTER}"

复制以上代码并保存为“*.VBS”,并运行便可以了。另外因为在命令行下,只支持8位字符长度的文件名,所以像“ProgramFiles”的这种文件名就要改写成“Progra~1”。如果想同时登陆多个QQ,只需再增加下面那样的代码就可以了.红色为QQ.exe所在硬盘的路径,蓝色改为QQ号码,绿色改为此QQ号码的密码。

WScript.Sleep 2000

QQPath="D:\Progra~1\Tencent\QQ\CoralQQ.exe"'QQ所在路径

Set

WshShell=WScript.CreateObject("WScript.Shell")

WshShell.Run

QQPath

WScript.Sleep 2000

WshShell.AppActivate

"QQ登录1"

WshShell.SendKeys"+{TAB}"

WshShell.SendKeys"123456789"

WScript.Sleep 200

WshShell.SendKeys

"{TAB}"

WshShell.SendKeys"123456789"

WScript.Sleep 200

WshShell.SendKeys

"{ENTER}"

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

中文代码编程软件(可以编写代码的软件)css简单网页框架代码 html css网页源码