1
I got the following HTML and would like there to be a check on javascript
to see if in the fields the characters typed are equal and larger than eight digits, to enable the button submit
.
I have a code JavaScript
which checks the number of characters, but I also need you to check that the fields are equal and enable the button if everything is positive.
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(){
document.querySelector("[name='senha_imob']").oninput = function(){
this.style.backgroundColor = this.value.length >= 8 ? "red" : "#D9ECF1";
}
});
</script>
<input name="senha_imob" type="password" class="imv-frm-campo">
<input name="rsenha_imob" type="password" class="imv-frm-campo">
<input type="submit" name="btn-entrar" value="ATUALIZAR" class="frm-botao" />
Gladison, your question is being denied because you didn’t submit any research or code you tried; you just posted an HTML code, and asked for the rest to be done. I suggest reading: https://answall.com/help/how-to-ask
– Mauro Alexandre