Ver Mensaje Individual
  #9 (permalink)  
Antiguo 30/04/2003, 10:31
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 1 mes
Puntos: 61
Código PHP:
<html>
<
head>
    <
title>Untitled</title>
    <
script>
    function 
comprobar(){
    if(
valor.value){
    
decimal=(valor.value-parseInt(valor.value));
    
decimal=parseInt(Math.ceil(1000*decimal/6))/100;
    
todo=parseInt(valor.value)+decimal;
    
a=Math.floor(todo*4)/4;
    
alert(a)}
    }
    
</script>
</head>

<body>


<input type="text"
       name="valor"
       size="5"
       maxlength="5" onBlur='if(isNaN(this.value)||this.value>99){this.value="";this.focus()}'>
<input type="button"
       value="pincha"
       onclick="comprobar()"
       >   

</body>
</html> 
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.