1234567891011121314151617181920212223242526272829303132 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>Login</title>
- <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
- </script>
- </head>
- <body>
- <h1>Admin Login</h1>
- <p>Please enter your password here</p>
- <input id="password" type="password">
- <button onclick="handleLogin()">Login</button>
-
- <script>
- function handleLogin() {
- var password = $("#password").val();
- $.ajax({
- url: "/login",
- data: {password: password},
- success: function(value){
- if (value == true){
- alert("You have logged in");
- }else{
- alert("Incorrect Password");
- }
- }
- });
- }
- </script>
- </body>
- </html>
|