The onblur event handler occurs when an element loses focus. Try click or write in the input field, then click elsewhere on the document so the input field lose focus.

Enter your name: