I am building a web app, where a user can set a value to a specific number. It looks like that
<button type="button" class="btn btn-outline-primary" onclick="decrease()"> +1 </button>
<button type="button" class="btn btn-outline-primary" onclick="increase()"> -1 </button>
<script>
var a = 0;
function increase()
{
a--;
document.getElementById("val").innerHTML = a;
}
function decrease()
{
a++;
document.getElementById("val").innerHTML = a;
}
</script>
Now I would like add an other button like:
<button type="button" class="btn btn-outline-primary" onclick="send()"> send it </button>
But I don't really now how to send it (maybe I should use axaj and POST). I would like to access the value from my django view.py file and process it further and send it back (here it's GET).
How can I do it? Appreciate any help here