79
rated 0 times
[
81]
[
2]
/ answers: 1 / hits: 68428
/ 12 Years ago, sun, december 2, 2012, 12:00:00
I am using the event listener structure like below to do some stuff when the input box loses focus.
But it won't work. What event should I listen to, to get the moment the input box loses the cursor inside it (i.e. user clicks outside of it)?
document.getElementById('div inside which input is located')
.addEventListener( 'blur', function(e){
if(event.target.className=='editInput'){
doStuff(event.target);
}
} , false );
More From » html