jQuery 安装
- 下载 jQuery,在 http://www.jQuery.com 上下载
- 在网页上引入 jQuery库
<script type="text/javascript" src="js/jquery.js" ></script>
(PS: 还有可以从
谷歌或微软引用 jQuery,
)
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js"></script>
使用微软或者google中的jQuery有优势,就是使用微软或者google的网站已经缓存过这些库,那访问速度相对来说会很快,但是也有个缺点就是只能是内网环境下访问的网站就不能使用外网引入jQuery了。