zoukankan      html  css  js  c++  java
  • js隐藏嵌入表边框

    代码
    <script type="text/javascript" src="jquery.min.js">
    </script>
    <script type="text/javascript">

    function jq_hide_tb_border( tb_id)
    {
    var tb=jQuery(tb_id);
    tb.css(
    "border","0");
    jQuery(
    "tr:first",tb ).find("td").css("border-top","0");
    jQuery(
    "tr:last",tb ).find("td").css("border-bottom","0");
    jQuery(
    "tr td:first-child",tb).css("border-left","0");
    jQuery(
    "tr td:last-child",tb).css("border-right","0");
    }

    $(
    function(){
    jq_hide_tb_border(
    '#innertable');
    });
    </script>

    HTML:

    代码

    <table width="878" height="383" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000"
    style
    ="border:solid 1px black; border-collapse:collapse">
    <tr>
    <td width="422" height="62">&nbsp;</td>
    <td width="450">&nbsp;</td>
    </tr>
    <tr>
    <td height="238">

    <table id="innertable" width="100%" height="300" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000"
    style
    ="border:solid 1px black; border-collapse:collapse">
    <tr>
    <td>sdf</td>
    <td>fsd</td>
    </tr>
    <tr>
    <td>sdfsd</td>
    <td>fsdf</td>
    </tr>
    <tr>
    <td>sdfsd</td>
    <td>fsdf</td>
    </tr>
    </table></td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>
  • 相关阅读:
    python -- twisted初探
    python -- redis连接与使用
    redis使用
    python -- 异步编程
    python
    python
    福大软工 · 最终作业
    福大软工 · 第十二次作业
    Beta 冲刺(7/7)
    Beta 冲刺(6/7)
  • 原文地址:https://www.cnblogs.com/wucg/p/1710891.html
Copyright © 2011-2022 走看看