Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 1
How do I pass a value from any table cell when clicked to Text box in html using JavaScript?
I want to use this in developing a calculator app in html.
1 Resposta
+ 1
Use this as an attribute of the table cells onclick=ātextBoxFunc(this.innerHTML)ā
Then the JavaScript would be:
function textBoxFunc(text){
document.getElementById(ātextBoxIdā).innerHTML = text;
}