Hi I want restrict to unwanted characters like not able to allow characters and special characters only allow to numbers and left,back,backspace and delete. for that requirement i need to pass below code in input field
onkeypress="return (event.which >= 48 && event.which <= 57) ||
event.which == 8 || event.keyCode == 46 || event.keyCode == 37 ||
event.keyCode == 39" maxlength="12"
I am trying to keep the above code in HTML attributes but it not going to place in input field.
so please any body can help me out this requirement how to achieved.