I have a simple HTML form like this:
<div class="border-little text-center grey">
<form action="https://www.THIS IS MY URL.php" method="get">
<input name="player" id="player" value="1" class="hidden">
<label for="number">Enter a number</label>
<input type="text" id="number" name="number" placeholder="">
<input type="submit" value="Submit">
</form>
</div>
The operation is as follows: The player enters a number, and the server answers using a JSON format.
My issue: When I press "submit" My webpage leaves and redirects to the server page display a JSON formatted answer.
What I want to do: I want to stay on my page and be able to receive the answer in JSON format and display them below my form instead of being redirected to the server page.
More details: example of JSON answer I get from the server:
{"guess": "lower"}
I cannot use any kind of JavaScript library so JQuery is forbidden.