"; 2. Download the file locally to import, the syntax ""."/> "; 2. Download the file locally to import, the syntax "".">

Home >Web Front-end >JS Tutorial >What are the two import methods for jquery?

What are the two import methods for jquery?

青灯夜游
青灯夜游Original
2021-11-22 14:42:277575browse

Two import methods: 1. Use the cdn static resource library to import, the syntax ""; 2. Download the local file to import , the syntax is "".

What are the two import methods for jquery?

The operating environment of this tutorial: windows7 system, jquery3.3.1 version, Dell G3 computer.

Two methods of jquery import

First: cdn static resource library reference

<script src="cdn的jquery网址"></script>

For example:

<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>

Second type: Local download reference

Local reference. This requires you to go to the official website to download the jq library to the local

What are the two import methods for jquery?

What are the two import methods for jquery?

Import local projects and directly reference the relative address

<script src="本地jquery文件地址"></script>

For example:

<script src="js/jquery-3.3.1.min.js"></script>

Recommended related video tutorials: jQuery Tutorial(Video)

The above is the detailed content of What are the two import methods for 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