I'm implementing a set of buttons which when pressed type alphanumeric characters in a textbox.
How can I implement backspace button so that whenever it is pressed, the last character in the textbox is erased from the textbox?
Try the below (Javascript)code on the press of a button...
var mytxtbx=document.getElementById("IdOfTextBox");
mytxtbx.value=mytxtbx.value.substring(0,(mytxtbx.value.length-1))
Try the below (JQuery)code on the press of a button...
$("#IdOfTextBox").val($("#IdOfTextBox").val().substring(0,($("#IdOfTextBox").val().length-1)))