I'm attempting to make an HTML page with a script that will store the user's input in a query string, then display it back to the user with the appropriate labels/descriptions in a confirmation page. This is what I have so far, I'm very new to Javascript but have some experience with HTML.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Bob's Pet Store</title>
<script src="petshop.js"></script>
</head>
<body>
<form id="myForm">
<h1>Place your customer information below!</h1>
<h2>Customer Information:</h2>
<h3>Please enter the neccessary information.</h3>
<p>First Name: <input type="text" id="fname" /></p>
<p>Last Name: <input type="text" id="lname" /></p>
<p>Email Address: <input type="text" id="address" /></p>
<p>State: <input type="text" id="state" /></p>
<p>Phone Number: <input type="text" id="number" /></p>
<br></br>
<br><input type="submit" id="submit" value="Submit Information"></form>
</br>
</body>
</html>
for this you could use confirm() and .value of the ID to get the job done like so:
JAVASCRIPT:
HTML (added onclick to button):
Hope this helped, if you got any bugs or problems feel free to reach out or comment.