"; 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?
Two import methods: 1. Use the cdn static resource library to import, the syntax ""; 2. Download the local file to import , the syntax is "".
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
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!