Home  >  Article  >  Web Front-end  >  Download and introduction of jQuery

Download and introduction of jQuery

无忌哥哥
无忌哥哥Original
2018-06-29 10:47:102769browse

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>

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!

Statement:
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