+ 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 Respuesta
+ 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;
}