Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form>
- <input id="usn" type="text" placeholder="Username" />
- <input id="psw" type="text" placeholder="Password" />
- <input type="submit" onsubmit="myFunction()" />
- </form>
- <script type="text/javascript">
- function myFunction() {
- var username = "The username you entered is: " + document.getElementById('usn').value + ". ";
- var password = "The password you entered is: " + document.getElementById('psw').value + ". ";
- alert(username + password);
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement