how to reset the form textbox value in html code example Example: how to reset input field in javascript document.querySelector('#counter').value = '';