I tried this one but not working. is there any way
Try this one. It works for me.
$("#testid").keypress(function (e) { e.preventDefault(); }).keydown(function(e){ if ( e.keyCode === 8 || e.keyCode === 46 ) { return false; } });