使用jQuery

    使用jQuery只需要在页面的 <head> 引入jQuery文件即可:

    <html>

    <head>

    <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>



    </head>

    <body>



    </body>

    </html>

    好消息是,当你在学习这个教程时,由于网站本身已经引用了jQuery,所以你可以直接使用:

    'use strict';



    alert('jQuery版本:' + $.fn.jquery);