On focus clear | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

On focus clear

How to use on focus to clear input field in JavaScript?

9th May 2018, 4:54 AM
love
1 Answer
+ 1
something like <input type=''text'' onfocus=''ddd()'' id=''inp''> <script> function ddd(){ document.getElementById(''inp'').value = "" } </script>
9th May 2018, 6:00 AM
Etabeta1🇮🇹
Etabeta1🇮🇹 - avatar