I have an input and I want the user to be sent to another page with the input value in the URI so that I can retrieve it.
Here is how my input is configured:
<input name="date" id="datepicker" onchange="window.location.href = 'test.php?Date=' + document.getElementById("datepicker").value;">
Basically, when the date changes, the date should be added at the end of the URI, and the user should be sent to test.php, where the value will be retrieved. However, the value does not seem to be added.
What is the problem?
source
share