亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

jQuery ??

??? ??????

jQuery ??? "??"? ???? ?? ???? ??? ???? HTML ??? "??"(?? ??)?? ? ?????. ?? ???? ???? ??? ??? ??? ??? ? ?? ??? ?? ?????.

?? ??? ???? ?????. jQuery ??? ???? ???(??) ???? ???? ????? ?? ??(??), ???(??), ????(??) ??? ? ????. ??? ???? DOM ????? ???.

img_travtree.png

?? ??:

<div> ??? <ul>? ?? ???? ? ?? ?? ?? ???? ?????.

<ul> ??? <li> ??? ?? ?????.

??? <li> ??? <span>

    ??? ????
    ? ?? ?????.

    ???

  • ? ?? ????
      ?
      ? ?? ?????.

      ? ?? <li> ??? ?????(??? ?? ??? ??).

      ???? <li> ??? <b>? ?? ????, <ul>? ?? ????, <div>? ?? ?????.

      <b> ??? ???? ?? <li>? ?? ???? <ul> ? <div>? ?? ?????.

      DOM ??

      jQuery? DOM ??? ?? ??? ??? ?????.

      ?? ??? ?? ? ??? ?? ??(tree-traversal)???.


  • ???? ??
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("button").click(function(){ $("li").each(function(){ alert($(this).text()) }); }); }); </script> </head> <body> <button>輸出每個列表項的值</button> <ul> <li>Coffee</li> <li>Milk</li> <li>Soda</li> </ul> </body> </html>