I want to remove input filed value while click on button.How can i do that.
For example
<input type="text" name="text"> /***************IF value =Akram ************/
<input type="button">
You can use an html only solution, when you put your input elements in a form
<form>
<input type="text" name="text" />
<input type="reset" />
</form>
JSFiddle
And here is a Javascript version
<input id="text" type="text" name="text" />
<input id="button" type="button" />
var text = document.getElementById('text');
var button = document.getElementById('button');
button.onclick = function() {
text.value = '';
}
JSFiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With