When javascript controls the display mode of table tr display block, it is only valid for the first cell.
There is a simple table:
<Table> <tr> <th> Number </th> <th> type </th> <th> details </th> <th> creation time </th> <th> modification time </th> <th> operation </th> </tr> <td> 5 </th> <td> TECH </th> <td> test content </th> <td> 2014 −01 −10 16:56:31 </th> <td> −−</th> <td> modify and delete </th> </tr> <tr id = "id_dync" style = "display: none "> <td colspan = 6> <div id = xxxx> test content </div> </td> </tr> </table>
You want to use javascript to control the hidden status of tr in the third line:
var tr_modifing = document.getElementById( "id_dync" );tr_modifing.style.display = "block";
After you set style. display to block, it will only be valid for the first cell td:
The reason is to set tr. style. after the display = "block", the tr is not a normal [Table] [row], but a common block like a common div, so the following
<td colspan=6 >
It will also become invalid. The correct method is
var tr_modifing = document.getElementById( "id_dync" );tr_modifing.style.display = "";
The display mode of tr is set to null. This attribute dispaly is not followed by anything. It is strange that it is compatible with Firefox and IE.