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.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!