I create dynamic a table with <tr>
and <td>
tags. One of the td tags gets the id "detailInfo". I have an onclick function on some button. I would like to set some value in the td "detailInfo" after pressing on the button.
So how can I set the value of the td with id "detailInfo" ?
This is the td:
<td id="detailInfo" rowspan="2" width="300px">picture detail</td>
use .html()
along with selector to get/set HTML:
$('#detailInfo').html('changed value');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With