Blogger Information
Blog 16
fans 0
comment 0
visits 9587
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP学习第13天 jquery的二种引入方式 2018年4月2日
方圆电脑
Original
585 people have browsed it

PHP学习第13课 jquery的二种引入方式 2018年4月2日作业

1.jquery的二种引入方式
2.$(document).ready()使用方式与简写
全部写在博客中即可,无手写作业

代码:

实例

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>2.jQuery的下载与引入</title>
</head>
<body>
<!-- 任务:点击文本,弹出它对应的域名 -->
<h2>php中文网</h2>
<!-- 在使用jquery之前,一定要将js库先引入 -->
<!-- <script type="text/javascript" src="../js/jquery-3.3.1.js"></script> -->
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<!-- 现在就可以直接痛快的写js代码啦 -->
<script type="text/javascript">
	$('h2').click(function(){
		alert('www.php.cn')
	})
</script>
</body>
</html>
<pre>
1.jQuery是一个js函数库,可以极大的简化js代码编写
2.jQuery本质上就是一个普通的js文件,只要下载导入到项目中即可
3.官网下载开发版本用于学习,项目上线后换成生成环境压缩版本
4.可以选择本地文件,也可以使用cdn在线版本,国内建议使用baidu静态资源库,访问速度快
5.jQuery中的大Boss是工厂函数$(),我们就从这个家伙开始jQuery学习之旅
</pre>

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!