html中table格式處理for (var i=0;i<tbsub.rows.length;i++){
html中table格式處理   
if(i==tbsub.rows.length-1){
html中table格式處理     
break;
html中table格式處理   }
html中table格式處理   
if(tbsub.rows(i+1).mid==tbsub.rows(i).mid){
html中table格式處理     
var nodes=xmldoc.selectNodes("//z:row[@mid='"+tbsub.rows(i).mid+"']")
html中table格式處理     tbsub.rows(i).cells(
0).rowSpan=nodes.length
html中table格式處理     tbsub.rows(i).cells(
1).rowSpan=nodes.length
html中table格式處理     
for(var j=1;j<nodes.length;j++){
html中table格式處理       tbsub.rows(j
+i).cells(0).style.display="none"
html中table格式處理       tbsub.rows(j
+i).cells(1).style.display="none"
html中table格式處理    }
html中table格式處理    i
=i+nodes.length
html中table格式處理  }
html中table格式處理 }
上面代碼中tbsub是table表單的id,該表單已經通過xml和xsl解析的方式生成,xml數據就在xmldoc中.已經生成的table經過上面的程序的處理,將會合併某幾列數據相同的行,其結果如下:
html中table格式處理

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2021-11-29
  • 2021-07-19
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案