zoukankan      html  css  js  c++  java
  • jQuery设置table样式

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script src="jQueryNote/jquery-1.8.2.js" type="text/javascript"></script>
        <script type="text/javascript">
      //        $(document).ready(function () {
      //            $("#tbl tr :lt(3)").css('font-size','30px') ;
      //        });
            $(function () {

                $('#tbl tr :lt(3)').css('font-size', '20px');
     //偶数行样式设置.
                $('tr :even').css('backgroundColor', 'red').siblings('tr').css('','');
            });

        </script>
    </head>
    <body>
        <table id="tbl" border="1" cellpadding="0" cellspacing="0">
            <tr>
                <td> 姓名</td>
                <td> 成绩</td>
            </tr>
            <tr>
                <td> 曦曦</td>
                <td> 90</td>
            </tr>
            <tr>
                <td>东东 </td>
                <td> 89</td>
            </tr>
            <tr>
                <td> 平均分</td>
                <td> 89.5</td>
            </tr>
        </table>
    </body>
    </html>

  • 相关阅读:
    solr源码解读(转)
    solr安装配置
    HTML转义字符
    JAVA:在0-99间产生100个不重复的随机数
    JS中的$符号
    使用Emacs敲出UML,PlantUML快速指南
    operator 安装
    package handler
    shell 条件判断if
    libvirtError: internal error: No more available PCI slots
  • 原文地址:https://www.cnblogs.com/nqsan/p/3221973.html
Copyright © 2011-2022 走看看