Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <center>
- <h1>Login system</h1><hr/>
- <input type="text" placeholder="enter your name" id="uName"/><br/><br/>
- <input type="password" placeholder="enter your password" id="uPass"/><br/>
- <br/><br/>
- <input type="button" value="Login" onclick="checkLogin()"/>
- <hr>
- <div id="res"></div>
- <script>
- var userName="zeev";
- var password="12345";
- function checkLogin(){
- if (uName.value==userName && uPass.value==password){
- res.innerHTML="Hello my master !!!<br>Have a nice day :)";
- }
- else{
- res.innerHTML="Why who are you??";
- }
- }
- </script>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement