Pass 2 values to a function by the onClick event

0

Good afternoon folks, I wanted to know how to step 2 values for a function, I'm planning to send an id and the message. I did reading some forums on the net, but it is not working.

<a  href="#" onClick="answer('+ objeto.idForum +',' objeto.message')" id="answer" >Responder</a>    

function answer(id, mensagem) {
    alert(id);
    alert(mensagem);
}
    
asked by anonymous 12.04.2017 / 19:33

0 answers