29 lines
805 B
Handlebars
29 lines
805 B
Handlebars
<html>
|
|
<head>
|
|
<title>Session Management in NodeJS using Express4.2</title>
|
|
<script src="../jquery-3.3.1.min.js"></script>
|
|
<script>
|
|
$(document).ready(function(){
|
|
var email,pass;
|
|
$("#submit").click(function(){
|
|
email=$("#email").val();
|
|
pass=$("#password").val();
|
|
/*
|
|
* Perform some validation here.
|
|
*/
|
|
$.post(window.location.href,{email:email,pass:pass},function(data){
|
|
if(data==='done')
|
|
{
|
|
window.location.href="/admin";
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
</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>
|