zoukankan      html  css  js  c++  java
  • jquery html标签的链式语法

    <div id="ProductNet">
    <table border='0' cellspacing='2' cellpadding='0' style='text-align: center; 674px;'>
    <tr>
    <td class='PNetTD'>
    日期类型
    </td>
    <td class='PNetTD'>
    更新日期
    </td>
    <td class='PNetTD'>
    信托单位净值(元)
    </td>
    <td class='PNetTD'>
    当期净值增长率
    </td>
    <td class='PNetTD'>
    累计净值增长率
    </td>
    </tr>
    </table>
    <table border='0' cellspacing='2' cellpadding='0' style='text-align: center; 674px; display:none;'>
    <tr>
    <td class='PNetTD' style="16%;">
    日期类型
    </td>
    <td class='PNetTD' style="16%;">
    更新日期
    </td>
    <td class='PNetTD' style="20%;">
    信托单位净值(元)
    </td>
    <td class='PNetTD' style="16%;">
    当期净值增长率
    </td>
    <td class='PNetTD' style="16%;">
    累计净值增长率
    </td>
    <td class='PNetTD' style="16%;">
    累计净值
    </td>
    </tr>
    </table>
    <table border='0' cellspacing='2' cellpadding='0' style='text-align: center; 674px;display:none;'>
    <tr>
    <td class='PNetTD'>
    日期类型
    </td>
    <td class='PNetTD'>
    更新日期
    </td>
    <td class='PNetTD'>
    信托单位净值(元)
    </td>
    <td class='PNetTD'>
    单位累计净值
    </td>
    <td class='PNetTD'>
    累计净值增长率
    </td>
    </tr>
    </table>
    </div>

    //jquery 链式语法糖

    if (a == 36){
    $('#ProductNet table').hide().eq(1).show();
    }
    else if(a == 35){
    $('#ProductNet table').hide().eq(2).show();
    }
    else {
    $('#ProductNet table').hide().eq(0).show();
    }

  • 相关阅读:
    get与post区别
    移动应用专项测试的思路和方法
    一个完整的http请求响应过程
    Linux基础
    浏览器输入url按回车背后经历了哪些?
    三大浏览器(火狐-谷歌-IE浏览器)驱动版本下载
    boost-序列化
    HTTP 2.0
    http首部字段
    与http协作的web服务器
  • 原文地址:https://www.cnblogs.com/fx2008/p/4154885.html
Copyright © 2011-2022 走看看