1
I have a form I call the function mail() at the onclick event.
<input type="checkbox" name="MesmoEmail" value="S" id="mesmoEmail" onclick="mesmoEmail();"> Mesmo e-mail do cadastro
And Javascript is like this:
<script>
function mesmoEmail(){
alert('aqui');
var marcado = document.getElementById('mesmoEmail');
}
</script>
The problem is that it is not working and in the console appears the following error:
And in the source code:
So far when I put the code, the word Even is of another color. I am not able to identify the error.
Oops, I put an answer and I didn’t see that I had answered. haha
– viana
Another question about this problem of how Ids can cause problems is: https://answall.com/a/123106/129
– Sergio