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

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -