Home  >  Article  >  Web Front-end  >  How to call external jquery in html

How to call external jquery in html

coldplay.xixi
coldplay.xixiOriginal
2021-01-06 16:38:493306browse

html Method to call external jquery: 1. Download the jQuery library from [jquery.com]; 2. Reference jQuery from Staticfile CDN, Youpaiyun, Sina, Google or Microsoft.

How to call external jquery in html

The operating environment of this tutorial: windows7 system, jquery3.2.1&&html5 version, DELL G3 computer. This method is suitable for all brands of computers.

Recommended: jquery video tutorial

html method of calling external jquery:

(1) Download jQuery

Download address: jquery.com

Production version: used in actual websites, has been streamlined and compressed.

Development version: For testing and development (uncompressed, readable code).

Use 3f1c4e4b6b16bbbd69b2ee476dc4f83a to introduce this jQuery file in the HTML page. The code is as follows:

<script src=&#39;本地jquery文件路径&#39;></script>

(2) Reference jQuery## on the public Internet

#The reference code is as follows:

<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">

or:

<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">

or:

<script src="https://upcdn.b0.upaiyun.com/libs/jquery/jquery-2.0.2.min.js">

or:

<script src="https://lib.sinaapp.com/js/jquery/2.0.2/jquery-2.0.2.min.js">

Recommended method 2 public network Quote.

Attention please! Be sure to introduce jQuery first, and then write your own jquery code. Because the loading order of the page is from top to bottom, the browser will load your jquery code first and then the jquery library, causing your jquery code to be considered incorrectly written. format, the effect cannot be achieved.

<script src="jQuery文件路径"></script>
<script>
//在此书写你的jquery代码
</script>

For more programming-related knowledge, please visit:

Programming Teaching

! !

The above is the detailed content of How to call external jquery in html. 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