谷歌浏览器和IE浏览器table的兼容性问题

qq_21992489 2015-11-25 11:23:24
直接贴上代码
<table border="1" width="40%" align="left" >
<tr>
<th style="text-align:center" width="5%">选择</th>
<th style="text-align:center" width="10%">PlaceID</th>
<th style="text-align:center" width="15%">IP</th>
<th style="text-align:center" width="10%">管理工具</th>
</tr>

<s:iterator value="#session.epList" var="eventPlace" status="status">
<tbody name="tbodyList" id="tbody_<s:property value="#eventPlace.StationID"/>" style="display: none" width="400pt">
<tr style="color: red;" >
<s:if test="#eventPlace.Spare3 != null">
<td align="center" >
<input name="stationID" id="stationID_<s:property value="#eventPlace.StationID"/>"
value ="<s:property value="#eventPlace.StationID"/>" type="checkbox" onclick="stID(this)">
</td>
<td align="center" colspan="3" >
<s:property value="#eventPlace.StationID"/>
</td>
</s:if>
</tr>
<s:if test=" #status.count%2==0">
<tr style="background-color: silver">
<td align="center" >
<input name="select" id="select_<s:property value="#eventPlace.StationID"/>" type="checkbox" value="<s:property value='#eventPlace.StationID'/>+<s:property value='#eventPlace.PlaceID'/>+<s:property value="#eventPlace.IP"/>"
onclick="selectOne(this)">
</td>
<td align="center" ><s:property value="#eventPlace.PlaceID"/></td>
<td align="center" ><s:property value="#eventPlace.IP"/></td>
<td align="center" ><a href=''>配置</a></td>
</tr>
</s:if>
<s:else>
<tr >
<td align="center" >
<input name="select" id="select_<s:property value="#eventPlace.StationID"/>" type="checkbox" value="<s:property value='#eventPlace.StationID'/>+<s:property value='#eventPlace.PlaceID'/>+<s:property value="#eventPlace.IP"/>"
onclick="selectOne(this)">
</td>
<td align="center" style="color: blue;" ><s:property value="#eventPlace.PlaceID"/></td>
<td align="center" ><s:property value="#eventPlace.IP"/></td>
<td align="center" ><a href=''>配置</a></td>
</tr>
</s:else>
</tbody>
</s:iterator>
</table>
做了一功能的tbody
IE


guge


之前试过固定td 的width 但是依然没有解决问题
求帮助 解决这个兼容性问题


...全文
843 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_21992489 2015-11-26
  • 打赏
  • 举报
回复
额 经过一番在百度的摸索 终于解决了问题 问题不是出在table的兼容性上 是在于我使用了tbody的 隐藏方式 style="display: none"的问题 谷歌内核在处理display: none 变成display: block的过程中 只是把一个th中的所有td 挤到对应的第一个th中 后面的空间不会解析 所有在控制tbody的显示和隐藏时 隐藏依然是 xxxx.style.display="none"; 但是显示改为 xxxx.style.display=" ";(只有双引号,中间没有任何东西!) 然后谷歌显示就正常了 感谢论坛的大神们
qq_21992489 2015-11-25
  • 打赏
  • 举报
回复
因为客户的电脑都是XP的 所以只能装谷歌浏览器了 所以想解决这个兼容性的问题!

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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