I have a problem with this, I researched a lot and I could not solve my problem. I hope you can help me!
I have a page (in html) with a form. I would like the value placed on the input of the first form, when clicking Submit, to be placed in the input value of the second form automatically.
This is the first code on the first page. I got this code from a question here in the gringa overflow.
<html>
<head>
<form action="display.html" method="GET">
<input type="text" name="serialNumber" />
<input type="submit" value="Submit" />
</form>
</body>
</html>
The second page would be this:
<html>
<head>
</head>
<body>
<div id="write">
<p>O valor é: </p>
</div>
<script>
// from display.html
document.getElementById("write").innerHTML = window.location.search; // you will have to parse
// the query string to extract the
// parameter you need
</script>
</body>
</html>
It works, but the problem is that I would like the value of the first input to be placed in the same form, on the second page, I just can not fit the codes.
To be able to put id="write"
in here, in order to happen what I'm trying to do.
<input type="text" name="serialNumber" />
Thank you guys, I know this is a very cool community, even without signing up, I've already found an answer to all my questions with you!