I'm trying to pass a value from one HTML document to the other, and this works, but when it's printing out the value, it's adding the name tag text= in front of it. Is there a way to get rid of the text= and just showing the entered value?
here is the form of the first page: pageOne.html
<form action="pageTwo.html" method="get">
<input type="text" name="text" />
<input type="submit" value="submit" />
</form>
and here the script of the second page: pageTwo.html
<script>
var queryString = decodeURIComponent(window.location.search);
queryString = queryString.substring(1);
var queries = queryString.split("&");
document.write(queries[0]);
</script>
queries[0]on the=character, then print the value at index1of the resulting array.