March 23, 2012
Update HTML Text Fields
Question by user1178619
How can I update the text fields with HTML? I have a page with some textfields, and I need to update these fields at a specific time. I used the value property to display the default values, but how can I change the values later?
Thank you
Answer by Starx
I am forcing a JavaScript
answer, since there is no way it can be done with only HTML
.
Snippet:
<input type="text" id="textboxid" />
<script type="text/javascript">
var txtBox = document.getElementById("textboxid");
txtBox.value = "new value";
</script>