场景描述:

  表格元素可切换;

  <table>

    <tr>

      <td>显示</td><td>隐藏</td>

    </tr>

  </table>

错误描述:

  table.rows[i].cells[j].style.display = 'table-cell';        报错:Invalid procedure call or argument。这是因为ie6,7不支持css2中添加的新样式,如tabel-cell

解决方案:

  var table_cell=$('#ie6,#ie7').length?'block':'table-cell';

     table.rows[i].cells[j].style.display = table_cell;  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2021-08-12
  • 2022-12-23
猜你喜欢
  • 2021-09-18
  • 2022-12-23
  • 2021-06-01
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
相关资源
相似解决方案