1.请问如何看到网页上用javascript做的密码密码登陆密码源代码?
2.求不用数据库简单的PHP密码验证源码
3.jsp登陆界面源代码
4.求html登陆界面详细代码 要可以登陆,不用数据库保存,验证源码验证源码只要验证账号密码正确,网页网页音乐网页源码就连接到另外一个.html的密码密码界
请问如何看到网页上用javascript做的登陆密码源代码?
一个简单的
账号是:username
密码是:password
<script language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.id.value=="username") {
if (form.pass.value=="password") {
location="page2.html"
} else {
alert("Invalid Password")
}
} else { alert("Invalid UserID")
}
}
//-->
</script>
<center>
<table bgcolor="white" cellpadding="" border="1">
<tr><td colspan="2"><center><h1><i><b>Login
Area</b></i></h1></center></td></tr>
<tr><td><h1><i><b>UserID:</b></i></h1></td><td><form name="login"><input
name="id" type="text"></td></tr>
<tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center><br><input
type="Reset"></form></td></tr></table></center>
求不用数据库简单的PHP密码验证源码
不用数据将密码直接写到源程序当中是很危险的只要查看源程序就知道密码
<form action="?" method="post">
用户名:<input type="text" name="username"/></br>
密 码:<input type="password" name="pwd" /></br>
<input type="submit" value="登入" /></br>
</form>
<?php
$username='admin';
$pwd='';
if(isset($_POST['username'])){
if( $_POST['username']==$username && $_POST['pwd']==$pwd ){
echo "登入成功!";
}else{
$_POST['pwd']==$pwd ){
echo "登入失败!验证源码验证源码区域分站源码";
}
}
>以上就是网页网页gpt源码泄露了,这种要每次重新登入
密码也不安全,密码密码不过有办法
你重新创建一个php
<?验证源码验证源码php
echo md5("");//你要设置的密码
>进去这个页面他会给出一个md5数据摘要
复制到$pwd
然后把密码对比改为
md5($_POST["pwd"])==$pwd
这种的话别人即使看到源码也不知道密码是什么
jsp登陆界面源代码
1、login.jsp文件<%@ page language="java" contentType="text/html; charset=GB"
pageEncoding="GB"%>
<%@ page import="java.util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4. 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>
<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=GB"
pageEncoding="GB"%>
<%@ page import="java.util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4. Transitional//EN">
<html>
<head>
<title>身份验证</title>
</head>
<body>
<%
request.setCharacterEncoding("GB");
String name = request.getParameter("userName");
String password = request.getParameter("password");
if(name.equals("abc")&& password.equals("")) {
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=GB"
pageEncoding="GB"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4. Transitional//EN">
<html>
<head>
<title>登录成功</title>
</head>
<body>
<%
request.setCharacterEncoding("GB");
String name = request.getParameter("userName");
out.println("欢迎你:" + name);
%>
</body>
</html>
扩展资料:
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://.0.0.1:;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. Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<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",密码密码pgsql源码行数 "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. Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO--1">
<title>Insert title here</title>
</head>
<body>
<hr size="" width="%" align="left" color="green">
<font size="6" color="red" >登录成功 </font>
<hr size="" width="%" 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. Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO--1">
<title>登录界面</title>
</head>
<body background="C:\Users\win8\workspace\Login\image\9dcbdceab5cfbc_.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>
求html登陆界面详细代码 要可以登陆,网页网页溯源码孕妇不用数据库保存,只要验证账号密码正确,就连接到另外一个.html的界
<script>
function check(){
var name=document.getElementById("name").value;
var pass=document.getElementById("pass").value;
if(name=="a" && pass=="a"){
alert("登入成功");
window.document.f.action="b.html";
window.document.f.submit();
}else{
alert("用户名或密码错误");
}
}
</script>
<form name="f" action="">
用户名:<INPUT TYPE="text" NAME="" id="name"><br>
密码:<INPUT TYPE="password" NAME="" id="pass"><br>
<INPUT TYPE="button" value="登入" onclick="check()"><INPUT TYPE="reset" value="重置">
</form>
不知道能不能符合你的要求 若有不足的地方请谅解和指导 呵呵
2024-11-27 04:27
2024-11-27 04:13
2024-11-27 04:07
2024-11-27 03:52
2024-11-27 03:13
2024-11-27 03:00