4
1
Fork 0
This repository has been archived on 2019-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
Shakes_and_Fidget/views/login.hbs
2018-02-20 02:36:01 +01:00

29 lines
802 B
Handlebars

<html>
<head>
<title>Session Management in NodeJS using Express4.2</title>
<script src="assets/jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function(){
var name,pass;
$("#submit").click(function(){
name=$("#name").val();
pass=$("#password").val();
/*
* Perform some validation here.
*/
$.post(window.location.href, {name:name,pass:pass}, function(data){
if(data==='success')
{
window.location.href="/";
}
});
});
});
</script>
</head>
<body>
<input type="text" size="40" placeholder="Type your name" id="name"><br />
<input type="password" size="40" placeholder="Type your password" id="password"><br />
<input type="button" value="Submit" id="submit">
</body>
</html>