Validacion de Multiplos De 5


<head>
<title></title>
</head>
<body>
<form name="form">
    Valor<input type="text" name="valor" id="valor">
    <input type="submit" name="enviar" id="enviar" value="Enviar" OnClick="prueba()">
</script>
</form>
</body>
</html>
<script type="text/javascript">
function prueba()
{
    z=0;
    x=document.getElementById("valor").value;
    z=x%5
    if(z==0)
    {
   
        alert("Si es multiplo de 5");
    }
    else{
   
alert("error");
}
}
</script>

0 Response to Validacion de Multiplos De 5

Publicar un comentario