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

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -