Blogger Information
Blog 28
fans 0
comment 0
visits 14103
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
jQuery入门第一课——2018年4月2日22时30分上传
泰礴松的博客
Original
658 people have browsed it

今天学习了jqery入门课,了解了工厂函数$的工作原理和使用方法,对jqery有了初步的认识现将本次作业提交如下:

一、jquery的二种引入方式

  1. 本地引入:


    实例

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

    运行实例 »

    点击 "运行实例" 按钮查看在线实例

  2. 网络引用:


    实例

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

    运行实例 »

    点击 "运行实例" 按钮查看在线实例

    二、$(document).ready()使用方式与简写

    本语句只要DOM创建完成就可以触发,不必等到元素全部加载完成,特别是有较大图片或文件时,效果非常明显,也可使用小图片先代替较大图片或文件进行加载,在利用ajax语句进行异步加载,既实现了网页的快速加载,又保证了网站内容的完整出现,给用户带来最好的使用体验。

    使用方法


    实例

     $(document).ready(function () {
          $('#list > li').addClass('horiz')
    })

    运行实例 »

    点击 "运行实例" 按钮查看在线实例

    简写方法
  3. 实例

    $(function () {
          $('#list > li').addClass('horiz')
        })

    运行实例 »

    点击 "运行实例" 按钮查看在线实例

Correction status:Uncorrected

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!