View Full Version : Creating a Backspace Button

12-07-2010, 09:31 PM
I have created a keyboard on Taco HTML via a table of buttons and within this keyboard I need a functioning Backspace button using javascript. I currently have a 'reset' button which clears all of the values in the text box.

If anyone could help on the coding for this backspace button it would be greatly appreciated :)

Old Pedant
12-07-2010, 11:12 PM
No idea what a Taco is other than a wonderful food source, but...

Can't you just do

fld.value = fld.value.substring( 0, fld.value.length-1 );


12-07-2010, 11:15 PM
fld.value = fld.value.substring( 0, fld.value.length-2 );

Old Pedant
12-07-2010, 11:43 PM
???? - 2 ??? Why? Instead of -1 ???