Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Home</title>
- <link rel="stylesheet" type="text/css" href="main.css">
- </head>
- <body>
- <h1>mysite1.com</h1>
- <form>
- <label id="userName">user name: <input type="text" name="userName"></label>
- <label>pass: <input type="password" name="pass"></label>
- <button>Send</button>
- </form>
- <a href="http://localhost:8080/sofia/today">get weather</a>
- <script type="text/javascript">
- let node = document.querySelector('#userName>input');
- node.addEventListener('blur', ()=>{
- // send AJAX request
- // recieve and process the response
- if(userExists){
- }
- })
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment