0
I have a form with an input of type="time", when I click on Submit the url sends the data like this:
hrentrada=HH%3AMM&hrsaida=HH%3AMM
.
I’d like you to rule like this:
hrentrada=HHMM&hrsaida=HHMM
.
Someone knows how to manipulate it?
<form name="teste" method="GET" action="index.html">
<input type="time" name="hrentrada"style="width:70px" maxlength="4 required>
<input type="time" name="hrsaida"style="width:70px" maxlength="4" required>
<input type="submit" name="submit">
</form>
preferably only with html and at most pure javascript
The browser does this on purpose to avoid having
:
in the URL. You can decode this with Javascript usingdecodeURIComponent('HH%3AMM&hrsaida=HH%3AMM')
... but the server should receive it correctly. You are using a server?– Sergio
I just wanted to take that %3A
– Vitor Pereira