I have a table that looks like this:
<table id="myTable"> <col id="name" /> <col id="birthYear" /> <col id="phone" /> <td> <tr>Joe</tr> <tr>1972</tr> <tr>202-555-1234</tr> </td> </table>
Is there an easy way to get an array of <col /> tags? I do not want to use getElementById because I do not know the col tag identifiers, although I will know the table Id. I do not want to use getElementsByTagName because there will be several tables with col tags in the document.
I do not use jquery, just plain javascript.
Any ideas?
source share