document.querySelector('#counter').value = '';
inputField.value = " ";
<form id="myForm">
First name: <input type="text" name="fname" value="Demo"><br>
Last name: <input type="text" name="lname"><br><br>
<input type="file" name="Photo" class=" custom-file-input" id="photo">
<input type="button" onclick="myFunction()" value="Reset form">
</form>
<script>
function myFunction() {
document.getElementById("myForm").reset();
}
</script>
Run code snippetHide results
document.getElementById('inpu').value = ''
<input type="text" onfocus="this.value=''" value="Blabla">
inputField.value = " ";