Home > Web Front-end > JS Tutorial > body text

Download and introduction of jQuery

无忌哥哥
Release: 2018-06-29 10:47:10
Original
2807 people have browsed it

Download and introduction of jQuery

1.jQuery is a js function library, which can greatly simplify the writing of js code

2.jQuery is essentially an ordinary js file. Just download and import it into the project

3. Download the development version from the official website for learning. After the project is online, change it to the generated environment compressed version

4. You can choose local files or use cdn online Version, domestically it is recommended to use baidu static resource library, access speed is fast

5. The big boss in jQuery is the factory function $(), we will start the jQuery learning journey from this guy

<!DOCTYPE html>
<html>
<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">
$(&#39;h2&#39;).click(function(){
alert(&#39;www.php.cn&#39;)
})
</script>
</body>
</html>
Copy after login

The above is the detailed content of Download and introduction of jQuery. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!