最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

All Selector (“*”)

all selector

version added: 1.0jQuery('*')

描述: 選擇所有元素。

警告: 所有,或普遍的,這個(gè)選擇器非常緩慢的,除了自身使用。

Examples:

Example: 查找每個(gè)元素 (包括 head, body, etc) 在文檔中。

<!DOCTYPE html>
<html>
<head>
  <style>
  h3 { margin: 0; }
  div,span,p {
    width: 80px;
    height: 40px;
    float:left;
    padding: 10px;
    margin: 10px;
    background-color: #EEEEEE;
  }
  </style>
  <script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
  <div>DIV</div>

  <span>SPAN</span>
  <p>P <button>Button</button></p>
<script>var elementCount = $("*").css("border","3px solid red").length;
$("body").prepend("<h3>" + elementCount + " elements found</h3>");</script>

</body>
</html>

Demo:

Example: A common way to select all elements is to find within document.body so elements like head, script, etc are left out.

<!DOCTYPE html>
<html>
<head>
  <style>
  h3 { margin: 0; }
  div,span,p {
    width: 80px;
    height: 40px;
    float:left;
    padding: 10px;
    margin: 10px;
    background-color: #EEEEEE;
  }
  #test {
    width: auto; height: auto; background-color: transparent; 
  }
  </style>
  <script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
  <div id="test">
  <div>DIV</div>
  <span>SPAN</span>
  <p>P <button>Button</button></p>
</div>
<script>
var elementCount = $("#test").find("*").css("border","3px solid red").length;
$("body").prepend("<h3>" + elementCount + " elements found</h3>");</script>

</body>
</html>

Demo:

jQuery 1.6 API 中文版腳本之家整理、修訂 (2011年6月)
温泉县| 井陉县| 盈江县| 禄丰县| 鄄城县| 万州区| 深州市| 满洲里市| 长泰县| 南陵县| 郧西县| 十堰市| 铁岭市| 临潭县| 溆浦县| 辽阳县| 布尔津县| 九寨沟县| 雷州市| 甘南县| 商都县| 蓬安县| 邹平县| 环江| 韶山市| 密山市| 什邡市| 抚松县| 上思县| 新河县| 沙洋县| 曲麻莱县| 星子县| 泽普县| 建昌县| 电白县| 元谋县| 永康市| 永胜县| 育儿| 珲春市|