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
Post a Comment