each

English [i:t?] US [it?]

adj ???

pron.

???? ??() ??? ???

Function: each() ???? ???? ? ??? ?? ??? ??? ?????. false? ???? ??? ??? ???? ? ??? ? ????.

??: ??$(selector).each(function(index,element))

????:

???? Description
function(index,element) ?????. ???? ? ??? ?? ??? ??? ?????.
index ???? ??? ??
?? ?? ??("this" ???? ??? ? ??)

???? ??() ??? ?

<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(){
  $("button").click(function(){
    $("li").each(function(){
      alert($(this).text())
    });
  });
});
</script>
</head>
<body>
<button>輸出每個(gè)列表項(xiàng)的值</button>
<ul>
<li>Coffee</li>
<li>Milk</li>
<li>Soda</li>
</ul>
</body>
</html>
???? ?? ?

??? ????? ??? "???? ??" ??? ?????