Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html lang = "es">
<head>
    <meta charset = "utf-8" />
    <title>Muestra oculta</title>
</head>
<body>
    <form>
        Cliente o Dependencia: <input type = "text" onkeyup = "cambio(this.value)" autofocus />
        <div id = "grupo">
            <p>
                Compra: <input type = "text">
            </p>
            <p>
                Fecha: <input type = "text">
            </p>
            <p>
                Zona: <input type = "text">
            </p>
            <p>
                Su día: <input type = "text">
            </p>
            <p>
                Numero: <input type = "text">
            </p>
            <input type="submit" values = "Registrar" name = "registrar3">
        </div>
    </form>
</body>
</html>
 
function cambio(valor){
    var grupo = document.getElementById("grupo");
    if (valor.length){
        grupo.style.display = "block";
    }
    else{
        grupo.style.display = "none";
    }
}
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers