javascript - How to take the id of a <tr> or <td>? -
i create dynamic table in javascript. row looks
<td id="user[i]['id']">user[i]['name']</td> so need value user[i]['id'] represents id of <td> or <input>.
how id ?
you can attribute value following:
document.getelementsbytagname("td")[0].id;
Comments
Post a Comment