Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>SweetAlert</title>
- <link rel="stylesheet" type="text/css" href="dist/sweetalert.css">
- </head>
- <body>
- <form>
- <input type="text" id="username" required placeholder="Username" />
- <br>
- <br>
- <input type="text" id="password" required placeholder="Password" />
- <br>
- <br>
- <button onclick="validation();">Login</button>
- <script src="sweetalert.min.js"></script>
- <script type="text/javascript">
- function validation()
- </form>
- <script src="sweetalert.min.js"></script>
- <script type="text/javascript">
- function validation()
- {
- // swal("Good job!", "You have logged in!", "success");
- // var username = 'martindenbeste';
- // var password = '12345';
- // var username = document.getElementById('username').value;
- // var passWord = document.getElementById('password').value;
- // if((username == userName) && (password ==passWord)) {
- // swal("Good job!", "You have logged in!", "success");
- // }
- // else {
- // sweetalert("Oops...", "Username or Password is incorrect", "error");
- // }
- }
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment