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

jQuery - noContribute() ???

jQuery? $ ??? jQuery? ??? ?????.

?? JavaScript ???????? $ ??? ??? ???? ??? ????

?? JavaScript ??????? MooTools, Backbone, Sammy, Cappuccino, Knockout, JavaScript MVC, Google Web Toolkit, Google Closure, Ember, Batman ? Ext JS? ?????.

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

jQuery ?? ? ??? ???? noContribute() ???? ??????.


noConstrict()? ??

noConstrict()? ??? ? ??? ????? ?????. ?, ??? ???? ?? jQuery ????, ?? ??? ??? jQuery? ??? ? ??? ????. ? ???? ?? ?? ??? jQuery ??? ??/???? ?? ??? ???? ??? ????. ????? ? ?? ??? ????. ? ?? ???? ???? ??? ?? ??? jQuery ?????? ????, ??? ?? ????? ?? ??? jQuery ?????? ?????. ? ?? ???? ?? ?? ???? ?? ???? ????. ???? ?? ?? ??? ??? ?? ??? jQuery ?????? ???? ?? ??? ??? ?? ??? jQuery ?????? ?????. ? ?? ?? jQuery ??/??? ?? ??? ???? ???. ?????? jQuery.noConstrict()? ? ??? ???? ? ??? ???.


jQuery noConstrict() ???

noConstrict() ???? $ ???? ?? ??? ???? ?? ?????? ??? ? ??? ???.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
<script>
    $.noConflict();
    jQuery(document).ready(function(){
      jQuery("button").click(function(){
        jQuery("p").text("jQuery在工作!");
      });
    });
</script>
</head>
<body>
    <p>看我的變化</p>
    <button>點(diǎn)我</button>
</body>
</html>

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

???? ??? ?? ? ????:

var jq = $.noConflict();
jq(document).ready(function(){
  jq("button").click(function(){
    jq("p").text("jQuery 仍然在工作!");
  });
});

jQuery ?? ??? $ ???? ???? ? ???? ???? ?? ?? ?? $ ??? Ready ???? ??? ??? ? ????. ? ???? ?? ???? $ ??? ??? ? ??? ?? ????? ??? "jQuery"? ???? ???.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
<script>
    $.noConflict();
    jQuery(document).ready(function($){
      $("button").click(function(){
        $("p").text("這是覆蓋的文字");
      });
    });
</script>
</head>
<body>
    <p>這是一段文字</p>
    <button>點(diǎn)擊顯示</button>
</body>
</html>


???? ??
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"> </script> <script> $.noConflict(); jQuery(document).ready(function($){ $("button").click(function(){ $("p").css({"background-color":"yellow","font-size":"30px"}); }); }); </script> </head> <body> <p>查看背景顏色變化</p> <button>點(diǎn)擊</button> </body> </html>