$(window).load(function() {
$(document).on('focusout','.n_val',function() {
alert(this.id);
});
});
Instead of using document you could use the text box's closest parent id or class. I have no idea of your html layout, hence using document. Also see jQuery on.