I'd like to have a text ie: search written inside the search field and I would like this text to disapear when the search field gets the focus.
I tried this code but it does'nt work even with other events like click any ideas?
mySearch.addEventListener('focus', function(e) { e.value=' '; });
1 Answer
I finally solved that by myself here's how the event argument is useless
mySearch.addEventListener('focus', function(e) { mySearch.value=' '; });
Your Answer
Think you can help? Login to answer this question!