When javascript controls the display mode of table tr display block, it is only valid for the first cell.
There is a simple table:
No. |
Type |
Details |
Creation Time |
Modification time |
Operation |
5 |
TECH |
Test content |
2014? 01? 10 16:56:31 |
?? |
Modify and delete |
Test content |
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
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.