mirror of
https://github.com/Hopiu/webapi-eca.git
synced 2026-05-04 05:24:45 +00:00
27 lines
No EOL
865 B
HTML
27 lines
No EOL
865 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Login</title>
|
|
<link rel="stylesheet" type="text/css" href="style.css">
|
|
<script src='//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'></script>
|
|
</head>
|
|
<body>
|
|
<h1>Login</h1>
|
|
<table>
|
|
<tr><td>username: </td><td><input type="text" id="username" /></td></tr>
|
|
<tr><td>password: </td><td><input type="password" id="password" /></td></tr>
|
|
</table>
|
|
<button id="but_submit">login</button>
|
|
<script>
|
|
$('#but_submit').click(function() {
|
|
$.post('../login', { username: $('#username').val(), password: $('#password').val() })
|
|
.done(function(data) {
|
|
window.location.href = document.URL;
|
|
})
|
|
.fail(function(err) {
|
|
alert('Authentication not successful!');
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |