![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
19/06/2012, 16:00
|
![Avatar de jgabrielsinner10](http://static.forosdelweb.com/customavatars/avatar267799_1.gif) | | | Fecha de Ingreso: octubre-2008
Mensajes: 26
Antigüedad: 16 años, 3 meses Puntos: 0 | |
Respuesta: No mas de un punto en un campo de texto
Código:
<SCRIPT language=Javascript>
<!--
function isNumberKey(evt, valor)
{
var charCode = (evt.which) ? evt.which : event.keyCode;
var keychar = String.fromCharCode(charCode);
var valid = valor.split(".");
if ((charCode > 31 && (charCode < 48 || charCode > 57)) && (keychar!="." || valid.length>1)){
return false;
}
return true;
}
//-->
</SCRIPT>
|