Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/06/2010, 05:52
Avatar de AdrianSeg
AdrianSeg
 
Fecha de Ingreso: enero-2010
Mensajes: 595
Antigüedad: 14 años, 3 meses
Puntos: 14
Respuesta: Problema numeros IE

SOLUCIÖN:

function solonumeros(e)
{

var key;

if(window.event) // IE
{
key = e.keyCode;
}
else if(e.which) // Netscape/Firefox/Opera
{
key = e.which;
}

if (key < 48 || key > 57)
{
return false;
}

return true;
}

Y la llamada sería:

onkeypress="javascript:return solonumeros(event)"