how to capture backspace key code in android browser - javascript? -


i have page made in pure html javascript... handle keyup code , need key code, when key code == 8 (backspace) special task must run... if open page in android browser, chrome, or whatever... backspace doesn't return key code...

i've made:

$( '.input-cell' ).bind( 'keyup', function( e ){     var keycode =  e.keycode ? e.keycode : e.which;     alert( keycode );     if( keycode == 8 ) {                .....    } }); 

the alert returns me keycodes backspace... there way capture backspace press event?

input change event

$('#myinput').bind('input', function(){     // code }); 

backspace

$('#myinput').on('keypress', function() {     //code     }).on('keydown', function(e) {         if (e.keycode==8) {             //code         }     }); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -