html里动态合并单元格?在线的哦!

a_aa_aaa_ 2012-06-01 11:49:10
我在页面全是div,数据是从数据库里取出来的,页面代码主要如下:
<div id="letter" >
<div id="tongxunlu_border">
<div style="text-align: center; float: left;">
<div style="width:130px; float:left; margin-top: 5px;">所在部门</div>
<div style="width:150px; float:left;margin-top: 5px;">人员名称</div>
<div style="width:150px; float:left;margin-top: 5px;">所任职务</div>
<div style="width:180px; float:left;margin-top: 5px;">手机1</div>
<div style="width:180px; float:left;margin-top: 5px;">手机2</div>
<div style="width:120px; float:left;margin-top: 5px;">电话</div>
<div style="width:70px; float:left;margin-top: 5px;">顺序</div>
</div>
<div style="float: left;">
<c:forEach var="tongxunluShow" items="${tongxunluShow}">
<div class="tongxunlu_content">
<div class="gggl" style="width:130px;">${tongxunluShow.depname}</div>
<div class="gggl" style="width:150px;" >${tongxunluShow.name}</div>
<div class="gggl" style="width:150px;" >${tongxunluShow.zhiwu}</div>
<div class="gggl" style="width:180px;">${tongxunluShow.b_phone}</div>
<div class="gggl" style="width:180px;" >${tongxunluShow.h_phone}</div>
<div class="gggl" style="width:120px;">${tongxunluShow.mobile}</div>
<div style="width:70px; float: left;">${tongxunluShow.order}</div>
</div>
</c:forEach>
</div>
</div>
</div>

我想要合并部门那一列,相同的部门只显示一次,谁能给点代码参考下。注意我这是层,不是table.
...全文
545 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
a_aa_aaa_ 2012-06-01
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 的回复:]

动态添加行、删除行、合并行,不都一样
[/Quote]
说的这么简单 、、、有没有代码 给点代码参考下行吗 网上查的都是table 我是div
bailanjh 2012-06-01
  • 打赏
  • 举报
回复
动态添加行、删除行、合并行,不都一样
yuanjun_xf 2012-06-01
  • 打赏
  • 举报
回复
我做过动态添加行和删除行,合并我想应该也不行,主要是用到innerHTML属性
告白气球 2012-06-01
  • 打赏
  • 举报
回复
js判断div的值是否一样
a_aa_aaa_ 2012-06-01
  • 打赏
  • 举报
回复
为什么一早上都没有答案 ,,难道大家没有碰到过这种问题吗?

50,545

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧