jquery当中css的用法

例 1.9
<html>
<head>
<title></title>
<style>
<!--
.dl td{
    border:1px solid #006606;
}
.dl tr.myrow{
    background-color:#ff0000;
}
-->
</style>
<script language="javascript" src="jquery.min.js"></script>
<script language="javascript">
$(function(){
    $("table.dl tr:odd").addClass("myrow");
    var o=$("table.dl tr:even");
    o.css("backgroundColor","blue");
});
</script>
</head>
<body>
<table class="dl" >

    <tr>
        <td>马克-to-win</td>
        <td>12</td>
        <td>13</td>
        <td>14</td>
        <td>15</td>
    </tr>
        <tr>
        <td>21</td>
        <td>22</td>
        <td>23</td>
        <td>24</td>
        <td>25</td>
    </tr>
    <tr>
        <td>31</td>
        <td>32</td>
        <td>33</td>
        <td>34</td>
        <td>35</td>
 

更多内容请见原文,文章转载自:https://blog.csdn.net/qq_44594371/article/details/103061362

posted @ 2021-12-31 16:18  malala  阅读(40)  评论(0编辑  收藏  举报