标签:org func ble too ams city jquer car script
作用::gt 选择器选取 index 值高于指定数的元素。index 值从 0 开始。经常与其他元素/选择器一起使用,来选择指定的组中特定序号之后的元素(如上面的例子)。
语法:$(":gt(index)"
参数:index 必需。规定要选择的元素。会选取 index 值大于指定数的元素。直线电机滑台
注释:请使用 :lt 选择器来选取 index 值小于指定数的元素。
<html> <head> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("tr:gt(2)").css("background-color","#B2E0FF"); }); </script> </head> <body> <html> <body> <h1>Welcome to My Web Page</h1> <table> <tr> <th>Id</th> <th>LastName</th> <th>FirstName</th> <th>Address</th> <th>City</th> </tr> <tr> <td>1</td> <td>Adams</td> <td>John</td> <td>Oxford Street</td> <td>London</td> </tr> <tr> <td>2</td> <td>Bush</td> <td>George</td> <td>Fifth Avenue</td> <td>New York </td> </tr> <tr> <td>3</td> <td>Carter</td> <td>Thomas</td> <td>Changan Street</td> <td>Beijing</td> </tr> <tr> <td>4</td> <td>Obama</td> <td>Barack</td> <td>Pennsylvania Avenue</td> <td>Washington</td> </tr> </table> </body> </html> </body> </html>
标签:org func ble too ams city jquer car script
原文地址:https://www.cnblogs.com/furuihua/p/11941233.html