1
I’m trying to make a login screen but I tried to make a <input type="checkbox" class="senhaMostrarOuOcultar" onclick="mostrarSenhaEOcultar()">
for it to hide or show the password, but when it is without css works normally, when I put the css to work, I click and it does not mark anything css is
input[type="checkbox"]{
position: relative;
left: 490px;
top: 100px;
}
but I’ve also tried
.senhaMostrarOuOcultar{
position: relative;
left: 490px;
top: 100px;
}
I tried for the class and the input + its type but for some reason it doesn’t work and I think it’s because of the css someone can help me
onclick="show ?
– hugocsl
the html code that shows the button was only that first code already js has Function displaySenhaEOcultar(){ var password = Document.getElementById("password"); if(password.type ="password"){ password.type = "text"; } Else{ password.type = "password"; } }
– Sathler do valorinho
password id is so from password input tag
– Sathler do valorinho
@hugocsl besides that I made it very clear that css is pq when ta without css it works
– Sathler do valorinho
You may be at risk of falling into problem X Y. (https://pt.meta.stackoverflow.com/questions/499/o-que%C3%A9-the-problem-xy) If you need help, I advise you to enter all the code so that we can help by thoroughly analyzing the whole context!
– Flávio Santos