jquery當中css的用法
阿新 • • 發佈:2021-12-31
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