Blogger Information
Blog 31
fans 0
comment 0
visits 20210
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
4.2号作业之初识jQuery--20180403提交!
tonykorn97的博客
Original
557 people have browsed it

要使用jQuery就需要先引入jQuery,引入jQuery有两种方法:

1,本地引入,把jquery文件放在本地,通过src直接引入本地文件(本人喜欢此种方式):

<script type="text/javascript" src="../js/jquery-3.3.1.js"></script>


2,CDN方式引用,直接引入互联网上的文件,引入方式如下:

<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>


作业之二:$(document).ready()如何使用:

$(document).ready(function(){

$('#list > li').addClass('horiz')

})


简写方式:

$(function(){

$('#list > li').addClass('horiz')

})


Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post