jQuery ?? find() ???
jQuery? ??? ?????. DOM ???? ??? ??? ?? ??? ??? ???? find() ???? ???? ???. ? ???? ???? ?? ?????. ???? children? find ??? ???? ???? ???. Children? ??-?? ?? ???? find? ?? ??(??-?? ?? ??)???.
?? ?? ?? ????:
<div class="div">
<ul class= "son">
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????'), ?? li? div? ????? find ???? ?? ??? ?? ? ????.
find() ???? ?? ?? ???:
? 1. ?? ??? ? ?? ?? ?? ??? ?????.
? 2. ?? ?? ???? ?? ??? ?? ?? ??? ?????. ??? ??? ??? ?????
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script> </head> <body> <div> <p>php.cn</p> <ul> <li>php<span> 中文網(wǎng)</span></li> </ul> </div> <script> $("div").find("span").css("color",'red'); </script> </body> </html>