您的位置:首页 > Web前端 > JQuery

jquery 全选、反选、各行换色、单击行选中事件

2012-01-31 22:47 405 查看
jquery 全选、反选、各行换色、单击行选中事件

css样式

View Code 1 <body>
2 <input type="button" value="全选" id="selectAll">
3 <input type="button" value="反选" id="unSelect">
4 <input type="button" value="取消" id="cancelSelect">
5 <table width="200" border="1">
6 <tr>
7 <td>cxv</td>
8 <td>zxcv</td>
9 <td>zxcv</td>
10 </tr>
11 <tr>
12 <td><form id="form1" name="form1" method="post" action="">
13 <label>
14 <input type="checkbox" name="checkbox" value="checkbox" />
15 </label>
16 </form> </td>
17 <td>zxcv</td>
18 <td>gfh</td>
19 </tr>
20 <tr>
21 <td><form id="form2" name="form2" method="post" action="">
22 <label>
23 <input type="checkbox" name="checkbox2" value="checkbox" />
24 </label>
25 </form> </td>
26 <td>fhg</td>
27 <td>ghj</td>
28 </tr>
29 <tr>
30 <td><form id="form3" name="form3" method="post" action="">
31 <label>
32 <input type="checkbox" name="checkbox3" value="checkbox" />
33 </label>
34 </form> </td>
35 <td>dfg</td>
36 <td>fgh</td>
37 </tr>
38 </table>
39 </body>
40 </html>运行结果:



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: