I have two pages; page1
and page2
. page1
holds a form while page2
has some images. I want to enter a sentence into the form on page1
and get the value of that text box on page2
.
the form on page1
<form name="input" action="page2.html" method="get">
<input type="text" name="textbox" id="textbox">
<input type="submit" value="Submit">
</form>
what would be the proper way to go about this?
Would I use the get
method along with the action
method to send the value through the url and then extract it using window.location.href
then splitting the text after the ?
or is there a simpler way of achieving this?
Thanks