国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

jQuery ???? ??? ??? ???? ????.

??? ??? ??? ???? ????

?????? ?? ??:

  • dvnode.innerHTML div? ??? ?? ????

  • dvnode.innerHTML = XXX? ??? ??? ??

??: innerHTML? w3c ?? ??? ??? ?? ??????? ?????.

jquery ?? ??:

  • $().html() //??? ??? ?? ????

  • $() .html(information); //??? ??? ??? ??

  • $().text() //??? ??? "??? ??? ??" ??? ????

  • $().text(information) ; //??? ??? ??? ?????. (html ??? ?? ?? "><" ??? ?? ???? ????.)

<!DOCTYPE html>
<html>
    <head>
        <title>php.cn</title>
        <meta charset="utf-8" />
        <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
        <script>
           function f1(){
            alert($('div').html());
            alert($('div').text());
            }
            function f2(){

                $('div').text("這里是php中文網(wǎng)");
            } 
        </script>
    </head>
    <body>
        <div>歡迎 <p>大家 <span>學(xué)習(xí)jQuery</span></p></div>

        <input type="button" value="獲取" onclick="f1()" />
        <input type="button" value="設(shè)置" onclick="f2()" /> 
    </body>
</html>



html()? text() ???? ???:

①??? ????

??? html ??? ?? ??? ???? ??? ? ????.

??? ?? ??? ???? ?????

②??? ??

??? ??? ? ????. html ?? ? ?? ??? ???

??? ?? ??? ???? ?????. ???? ?? ?? ???? ?? ?? "<" ">" ??? ?? ???? ?????. ;----> Space-- ----  

?? ? ??(????/??)? ?? ??? ?? ??? ??? ?? ??? ??? ????.


???? ??
||
<!DOCTYPE html> <html> <head> <title>php.cn</title> <meta charset="utf-8" /> <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script> <script> function f1(){ alert($('div').html()); alert($('div').text()); } function f2(){ $('div').text("這里是php中文網(wǎng)"); } </script> </head> <body> <div>歡迎 <p>大家 <span>學(xué)習(xí)jQuery</span></p></div> <input type="button" value="獲取" onclick="f1()" /> <input type="button" value="設(shè)置" onclick="f2()" /> </body> </html>