I have a calendar where every day is:
<a class="dia" href="#">(Número do dia, ex: 1, 2, 3, etc)</a>
I did this below, but the problem is that I can only choose 1 class, I want it to work with either:
<a class="dia" href="#">1</a>
<a class="dia" href="#">2</a>
<script>
document.getElementsByClassName("dia")[0].onclick = function() {teste()};
function teste() {
alert("Deu Certo!");
}
</script>