Aspects


vs


Onclick

An event which occurs when user clicked an object

Onfocus

Onfocus is an event in HTML and JavaScript that triggers when the referenced object gains focus

Others

Quality Example
More appropriate

"Also the onfocus event would be more appropriate than onclick because it handles other scenarios such as pressing the tab key to change the active input"

from question "Changing image on click of textbox"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0