Jquarry und login
This commit is contained in:
parent
34f9431345
commit
be4ba34a2d
1 changed files with 29 additions and 23 deletions
|
@ -1,23 +1,29 @@
|
||||||
<form action="action_page.php">
|
<html>
|
||||||
<div class="imgcontainer">
|
<head>
|
||||||
<img src="img_avatar2.png" alt="Avatar" class="avatar">
|
<title>Session Management in NodeJS using Express4.2</title>
|
||||||
</div>
|
<script src="../jquery-3.3.1.min.js"></script>
|
||||||
|
<script>
|
||||||
<div class="container">
|
$(document).ready(function(){
|
||||||
<label for="uname"><b>Nutzername</b></label>
|
var email,pass;
|
||||||
<input type="text" placeholder="Enter Username" name="uname" required>
|
$("#submit").click(function(){
|
||||||
|
email=$("#email").val();
|
||||||
<label for="psw"><b>Passwort</b></label>
|
pass=$("#password").val();
|
||||||
<input type="password" placeholder="Enter Password" name="psw" required>
|
/*
|
||||||
|
* Perform some validation here.
|
||||||
<button type="submit">Login</button>
|
*/
|
||||||
<label>
|
$.post(window.location.href,{email:email,pass:pass},function(data){
|
||||||
<input type="checkbox" checked="checked" name="remember"> Remember me
|
if(data==='done')
|
||||||
</label>
|
{
|
||||||
</div>
|
window.location.href="/admin";
|
||||||
|
}
|
||||||
<div class="container" style="background-color:#f1f1f1">
|
});
|
||||||
<button type="button" class="cancelbtn">Cancel</button>
|
});
|
||||||
<span class="psw">Forgot <a href="#">Passwort??</a></span>
|
});
|
||||||
</div>
|
</script>
|
||||||
</form>
|
</head>
|
||||||
|
<body>
|
||||||
|
<input type="text" size="40" placeholder="Type your email" id="email"><br />
|
||||||
|
<input type="password" size="40" placeholder="Type your password" id="password"><br />
|
||||||
|
<input type="button" value="Submit" id="submit">
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
Reference in a new issue