Por el momento, solo me funciona el "Backspace" el Tabulador.. no anda por nada.. . (NOTA: SOLO EN FIREFOX FALLA)
Todo bien con Opera y "esploler"..
Código PHP:
function CheckNumericCharacter(event)
{
if (String.fromCharCode(event.which) >= "0" &&
String.fromCharCode(event.which) <= "9" ) {
return true; }
else if (String.fromCharCode(event.which) == "." ||
String.fromCharCode(event.which) == "," ) {
return true; }
else if ( event.which == 8 || event.which == 9 )
return true;
else {
return false;
}
}
la mando llamar así (Incluído el consejo de JavierB, de usar onKeyup):
Código PHP:
onKeypress="return CheckNumericCharacter(event)" onKeyup="return CheckNumericCharacter(event)"
No me deja usar el tabulador para pasar a otro inputbox