simplemente comprueba que el punto ya exista:
Código Javascript
:
Ver originalfunction entero(e)
{
var caracter;
var targ;
if(window.event) // IE
{
caracter = e.keyCode
}
else if(e.which) // Netscape/Firefox/Opera
{
caracter = e.which;
}
status = caracter ;
if (e.target) {
targ = e.target;
}
else if (e.srcElement)
{
targ = e.srcElement;
}
if (targ.nodeType == 3) {// defeat Safari bug
targ = targ.parentNode;
}
if (caracter>47 && caracter <58 || (caracter == 13) || (caracter == 46) || (caracter == 8))
{
if(caracter == 46 && targ.value.indexOf('.')!=-1){
return false;
}
return true;
}
return false;
}