I have only learned HTML, CSS, JavaScript and jQuery and I want to get a value from my form
to my index
page, which is located in different files, using the languages I know. So this is my form :
<form action="../index/index.html" method="GET">
<label for="name">Name :</label>
<input type="text" name="name" id="name" required>
<label for="email">Email :</label>
<input type="text" name="email" id="email" placeholder="[email protected]" required>
<input type="submit" name="submit" id="submit">
</form>
I want the value that a user submits in the #name
input
in my index's div
tag when the submit
button is pressed (this div
has the class sing-in
).
Both pages have their own JavaScript and CSS so if I would import the JavaScript of the page where the form is to my index
pages it will mess up both pages I guess. Therefore, I want to do this without importing the JavaScript and just by taking the value from another page into my index page. Thank you.
Copyright Notice:Content Author:「ShreYas Vairagi」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/55892728/how-can-i-get-a-value-from-a-form-in-page-1-to-another-page-by-using-javascript