+ 2
How can i use onfocus, unload and onblur Events
please explain me more about it with example. How can i use it in what elements of HTML these Events are mostly used.
4 Respuestas
+ 4
Ethan Franklin:
With the .addEvetListener() method, the first argument is spelled without the 'on' prefix, only used on related html attribute name ;)
+ 1
@Visph
in Event Listener method
example// div.addEventListener("click","myfunc");
why we are not using onclick why just click;
if i do not you "on" and just write [change, blur, unload] is it going to work
+ 1
thanks i got it.
- 1
'onfocus', 'onblur' events are "mostly used" for <form> elements (mostly <input> elements)...
'unload' event is mostly used for <body> / document element... but could be used also on <img> element...
How you can use them, and example of use are beyond the scope of Q&A answers: you must be more specific on your question ^^