Answers for "empty input field javascript"

1

how to make input field empty in javascript

Assuming the element you want to change has the id question, so you can do

document.getElementById("question").value = "";
Posted by: Guest on March-18-2021
0

js remove value input

document.getElementById("YourID").value = '';
Posted by: Guest on December-21-2020
-2

js clear text in input

<input type="text" value="A new value" onfocus="if(this.value=='A new value') this.value='';">
Posted by: Guest on December-23-2020

Code answers related to "empty input field javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language