学习书籍:Head First jQuery
编程软件:Sublime Text 2
(本系列文章只是充作本人学习笔记,如有侵权,请告知,将立即删除。如因此给版权人带来困扰,在此致以诚挚的歉意)
1、jQuery是什么?
jQuery是一个专门用来动态改变Web页面文档的JavaScript库
2、jQuery的基本功能
①访问和操作DOM元素②控制页面样式③对页面事件处理④在页面中运用大量插件⑤与Ajax技术结合
3、搭建jQuery开发环境
下载jQuery文件库--->引入jQuery文件库
进入官网下载http://jquery.com/---------->点击
下载Download the compressed, production jQuery 1.11.3和Download the uncompressed, development jQuery 1.11.3
注意!网站已写明jQuery 2.x 和 jQuery 1.x的API是相同的,但是不支持IE6,7,8使用时需注意
生产版本和开发版本有什么区别?
生产版本:是一个简化版本,主要是为了提高在Web服务器上的执行程度
开发版本:面向对探索和扩展JQuery库内部工作感兴趣的开发人员
如何导入jQuery文件库?
使用<script>文件导入标记,在页面的<head></head>中加入如下代码:
<script language="javascript" type="text/javascript" src="Jscript/jquery-1.11.3.min.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <head> <title>第一个简单的jQuery程序</title> <script language="javascript" type="text/javascript" src="Jscript/jquery-1.11.3.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ alert("您好,欢迎来到jQuery世界"); }) </script> </head> <body></body> </html>