Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- </head>
- <body>
- <script src="js/jquery-3.2.0.js"></script>
- <script src="js/FormSample.js"></script>
- <p> Please note, the password MUST contain atleast one Uppercase letter and one number. The password MUST be 6 letters long.</p>
- <form name="myForm">
- <form onsubmit="return checkForm(this);">
- <p>Username: <input type="text" name="username"></p>
- <p>Password: <input type="password" id="password" name="pwd1"> </p>
- <p>Confirm Password: <input type="password" id="confirm_password" name="pwd2"><span id='message'></p>
- <br><br>
- <input type="Submit" value="Submit">
- </form>
- <script type="text/javascript">
- $('#password, #confirm_password').on('keyup', function () {
- if ($('#password').val() == $('#confirm_password').val()) {
- $('#message').html('Matching').css('color', 'green');
- } else
- $('#message').html('Not Matching').css('color', 'red');
- });
- //This is to grab my username from the form
- jsvar = document.myform4.username.value;
- // document.write(jsvar) // test
- document.getElementById("demo").write(jsvar);
- </script>
- <p> Listen man save some shit</p>
- <button type="button" onclick='document.getElementById("demo").innerHTML = (jsvar)'>Click Me!</button>
- <p id="demo"></p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement