I have TD Id.But i need to get TR id using TD id .How can i get.
Help me on this.
tr
是td
的父节点:
var tableRowId = document.getElementById("id_of_td").parentNode.id;
TR是TD的父节点,因此您需要执行以下操作:
var trId=document.getElementById(tdId).parentNode.id;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.