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

jQuery ???

jQuery Selectors

jQuery ???? ???? HTML ?? ???? ?? ??? ?? ??? ??? ? ????.

jQuery ???

jQuery ???? ???? HTML ?? ???? ?? ??? ?? ??? ??? ? ????.

jQuery ???? ??? ID, ???, ??, ??, ?? ? ?? ???? HTML ??? "??"(?? ??)???. ?? ?? ??? ?? ??? ?? ?? CSS ???? ???? ???.

jQuery? ?? ???? ?? ??($())? ?????.

Element Selector

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

???? ?? <p> ?? ??:

$("p")

?

???? ??? ???? ?? <p> ??? ?????.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>jQuery示例</title> 
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("p").hide();
  });
});
</script>
</head>
<body>
<h2>這是一個(gè)標(biāo)題</h2>
<p>這是一個(gè)段落。</p>
<p>這是另一個(gè)段落。</p>
<button>點(diǎn)我</button>
</body>
</html>

#id ???

jQuery #id ???? HTML ??? id ??? ?? ??? ??? ?????.

???? ?? ??? ID? ???? ??? ???? ?? ??? ??? ????? #id ???? ???? ???.

id? ??? ???? ??? ??? ????.

$("#test")

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("#test").hide();
  });
});
</script>
</head>
<body>
<h2>好好學(xué)習(xí)</h2>
<p>天天向上</p>
<p id="test">PHP測(cè)試</p>
<button>點(diǎn)我</button>
</body>
</html>

.class ???

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

??? ??? ????: ($ (". Test")

??

??

("*") ?? ?? ??

$ (this) ?? HTML ?? ??

$ ("" " p.intro") ?? ??? ??? <p> ??? ?????.

$("p:first") ??????????????????????????????????????????????????????????? ? ?? <p> ?? ???????????????????????????~????????????????????????????????????????????("ul li:first-child") ? <ul> ??? ? ?? <li> ??? ?????.

$("[href] ") href ??? ?? ??? ?????.

$("a [target='_blank']") ?? ?? ?? "_blank"? ??? ?? <a> ??? ?????.

$("a[target! ='_blank']") "_blank" & Lt; a & gt; ??

? ?? ?? ?? ?? ?? ? ?? $ (": Button") ?? ?? ?? = "Button" & lt; ?? & gt; ?? & gt; ??

("tr: event") Tr & gt; $ ("tr: ODD")

jQuery ?? ??

? ???? ?? ???? ???? ?? jQuery ??? ?? ?? ??? ? ??? ???? jQuery ??? ??? .js ??? ?????.

?????? jQuery? ??? ? <head> ??? ??? ?? ?????. ??? ??? ?? ??? ??? ???? ?? ? ????(src ??? ?? ?? ??):

<head>
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js">
</script>
<script src="my_jquery_functions.js"></script>
</head>

???? ??
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("button").click(function(){ $(".test").hide(); }); }); </script> </head> <body> <h2 class="test">你馬上就看不見(jiàn)我了</h2> <p class="test">你就要看不見(jiàn)我了</p> <p>為什么還能看見(jiàn)我</p> <button>點(diǎn)我</button> </body> </html>