2
I am new in the area and would like to know how to identify which of the id’s that triggered the click function. Or if there is a better way to accomplish this code, the idea is to do a javascript quiz.
<div id="perg1">1: Pergunta 1</div>
<div id="resp1" onclick="clicar()">1 - resposta 1</div>
<div id="resp2" onclick="clicar()">2 - resposta 2</div>
<div id="resp3" onclick="clicar()">3 - resposta 3</div>
<div id="resp4" onclick="clicar()">4 - resposta 4</div>
<div id="return" onclick="voltar()">Voltar</div>
Thank you very much! now I will see how I will use the information that is returned to me.
– Ade