In jQuery I get the value using following code:
$('#input_id').keypress(function(){
var content= $(this).val(); alert(content);
});
In this case I type 'a' it alerts blank and I type 'ab' it alerts 'a'. Is any idea for when I type 'a' it should alert 'a' and when I type 'ab' it should alert 'ab'?