Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run JavaScript when an element loses focus

How about onblur event :

<input type="text" name="name" value="value" onblur="alert(1);"/>

onblur is the opposite of onfocus.


You want to use the onblur event.

<input type="text" name="name" value="value" onblur="alert(1);"/>

You're looking for the onblur event. Look here, for more details.