Use the HTML DOM to assign an "onblur" event to an input element.
Write in the input field and click outside the field to lose focus (blur).