Using the 'onblur' event in JavaScript | Event Listeners Explained

preview_player
Показать описание
The 'onblur' event in JavaScript allows you to react whenever an input field loses focus - this is especially useful in situations where you'd like to check for valid user input only after the user has stopped entering data in the field(s).

In this video I take you through a simple example of how you might use this event by checking if an input field contains a particular string of text ('dcode') only AFTER the user has stopped entering text in.

For your reference, check this out:

Follow me on Twitter @dcode!

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Рекомендации по теме
Комментарии
Автор

Great simple and straight forward tutorial

smoothbeak
Автор

Very nice explanation. and Nice color theme selection of VS Code. BTW what's the name of the theme?

vikasgarg
Автор

Hey can you tell your vscode theme or can you send your setting.json file

saivivekravi
Автор

What is the diffrence between onchange and onblur?

FrankyyBalboa