Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.7 kB
0
Indexable
Never
<!DOCTYPE html>
<html lang="it">

<head>
    <meta charset="utf-8">
    <title>Inserisci il titolo</title>
    <meta name="description" content="Inserisci la descrizione">

    <!-- DA AGGIUNGERE in HEAD -->
    <link rel="stylesheet" href="css/bootstrap.css">
    <link rel="stylesheet" href="css/stile.css">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, intial-scale=1">
</head>

<body>

    <!-- ESEMPIO RIGA -->


    <div class="container-fluid">
        <h2>REGISTAZIONE</h2>
        <br>
        Username: <input id="username" type="text" name="username"><br>
        <br>
        Password: <input id="campo" type="password" name="password"> <span id="occhio"
            class="glyphicon glyphicon-eye-open" onClick="cambia()"></span>

        <script>

            function cambia() {

                if (document.getElementById("campo").type == "password") {
                    document.getElementById("campo").type = "text";
                    document.getElementById("occhio").className = "glyphicon glyphicon-eye-close";
                }
                else {
                    document.getElementById("campo").type = "password";
                    document.getElementById("occhio").className = "glyphicon glyphicon-eye-open";

                }
            }
        </script>
        <br><br>
        <h3>SCEGLI I TUOI SOCIAL</h3>
        <br>
        <input id="btn-facebook" type="checkbox" onclick="attiva('facebook');">
        Facebook<br>
        <input id="btn-twitter" type="checkbox" onclick="attiva('twitter');">
        Twitter<br>
        <input id="btn-instagram" type="checkbox" onclick="attiva('instagram');">
        Instagram<br>
        <input id="btn-youtube" type="checkbox" onclick="attiva('youtube');">
        Youtube<br>

        <br>
        <h3>SELEZIONATI</h3><br>
        <div class="social nascosto" id="facebook"></div>
        <div class="social nascosto" id="instagram"></div>
        <div class="social nascosto" id="twitter"></div>
        <div class="social nascosto" id="youtube"></div>


    </div>


</body>

<!-- IN FONDO ALL'HTML -->
<script src="https://code.jquery.com/jquery-3.3.1.js" type="text/javascript"></script>
<script src="js/bootstrap.js"></script>
<script type="text/javascript">
    function attiva(nome) {
        if(document.getElementById("btn-" + nome).checked)
            document.getElementById(nome).className = "social";
        else
            document.getElementById(nome).className = "nascosto";

    }
</script>

</html>