dimanche 16 juillet 2017

what is wrong with my code if command didn't want to work

the problem is here the if command doesnt seem working

<script>

    var Password = document.getElementById('text3');
           if (Password.value == "hi")
    {
        alert("nice");
    }
</script>

<div>
<fieldset>
<legend>Calculator</legend>
<br> <input type"text" id="text1" onclick="this.focus();this.select()" /> <br>
<br> <input type="text" id="text2" onclick="this.focus();this.select()" /> <br>
<br> <input type="text" id="text3"  onclick="this.focus();this.select()" /> <br>
<new> <input type="button" value="add me" onClick="addme()" ></new>
<nn> <input type="button" value="clear" onClick="cls()" > </nn>

</fieldset>`enter code here`
</div>

Aucun commentaire:

Enregistrer un commentaire