Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <form action="/action_page.php">
- First name: <input type="text" name="FirstName" value="Mickey" id="NameInput"><br>
- Last name: <input type="text" name="LastName" value="Mouse" id="LastNameInput"><br>
- <input type="submit" value="Submit" onclick="FunctionJS()">
- </form>
- <script>
- function FunctionJS()
- {
- var name = document.getElementById("NameInput").value;
- var lastName = document.getElementById("LastNameInput").value;
- alert("name: " + name + " lastName: " + lastName);
- }
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment