3
Hi, I’m trying to take the value of a button and put it into a variable, but it doesn’t seem to help at all?
///HTML
<button class="teclado" id="qTeclado" onClick="clickTeclado(this.value);" value="Q">Q</button>
//JS
var letra = function clickTeclado(letra) {
document.getElementById('qTeclado').onClick = letra;
alert(letra);
}
worked, thank you very much!!!
– Paulo Henrique Rodrigues Grund
@Paulohenriquerodriguesgrund if the answer solved your problem and there was no doubt left, mark it as correct/accepted by clicking on the " " that is next to it, which also marks your question as solved. If you still have any questions or would like further clarification, feel free to comment.
– NoobSaibot