There is a simple table:
<table > <tr > <th> numbering </th> <th> type </th> <th> detail </th> <th> Create Time < /th> <th> Modify Time </th> <th> actions </th> </tr> <tr> <td>5</th> <td >TECH</th> <td> test content </th> <td>2014?01?10 16:56:31</th> <td>?? </th> <td> Modify 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 control the third line of TR implicit state via javascript:
var tr_modifing = document.getElementById ("Id_dync"); tr_modifing.style.display = "block";
When this style.display is set to block, only the first cell TD is available:
The reason is that after tr.style.display = "Block", the TR is not a normal "table" of "line", and just like ordinary div like ordinary blocks, so the following
<>
And as it fails, the right thing to do is
var tr_modifing = document.getElementById ("Id_dync"); tr_modifing.style.display = "";
The display mode of the TR will be set to empty, this property dispaly nothing behind, very strange, so it is compatible with Firefox and IE.
When JavaScript controls the table TR display block mode, only the first cell is valid