Blogger Information
Blog 51
fans 0
comment 1
visits 70642
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
jquery入门
呵呵哒
Original
820 people have browsed it

jquery引入方式有两种

1一种是通过本地文件,引入,如同css引入一般

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


2通过在线引用方式,

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

类似css引入方式本次链接来源百度

http://cdn.code.baidu.com/



完整模式 


 $(document).ready(function){

    $(‘#list>li’).addClass('horiz')   //给li标签加个样式

}


简写模式


$(function(){

$('list>li').add.Class('horiz')  //给li标签加个样式

})

使用$(document).ready()  只要dom结构加载完之后 即可渲染页面了






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
  • 1
    2018-03-17 17:09:25