html - Javascript: Set ID to a child existing table -
I have to set / set a unique ID per javascript per child tables. The main parent table has an ID but the hair tables do not have hair tables and further hair tables.
How can I set up the first child and the second child's "On Page Load"?
& lt; Table id = "main parent table" & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Table & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Tbody & gt;
You're probably looking for something like this : Each (work (eq, el) {el = '(' id ')) === "<"> "undefined") {el.attr (' id ', 'Table-' + eq);}});
If you check each table on the site and if there is no ID in it, then you specify the ID of "table-" for each of the trees.
Comments
Post a Comment