Answer the question
In order to leave comments, you need to log in
How to change text form value in html?
There is a html side on it textbox from a form with django, tried changing the value with
document.getElementById('id_records_text').innerText = document.getElementById('id_records_text').textContent + 4
<form action="drecords" method="post">
{% csrf_token %}
{{ form }}
<input class="button" type="submit" value="отправить">
</form>
Answer the question
In order to leave comments, you need to log in
Because you are inserting just text, but you need to insert a value, the easiest way to do this is to use .val () with the jQuery library included.
api.jquery.com/val
innerText is the text inside, and the value of the intput is element.value
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question