为什么要加html,作用是什么?

来源:1-1 使用load()方法异步请求数据

慕粉18144024425

2017-02-17 13:59

 $("ul")

                    .html("<img src='Images/Loading.gif' alt=''/>")

                    .load("http://www.imooc.com/data/fruit_part.html",function(){

                        $(this).attr("disabled", "true");

                    });


写回答 关注

2回答

  • 吴彦祖的帅气
    2017-02-22 22:02:44
    已采纳

    这主要是load还未加载完成的时候将ul里的内容显示该图片(Images/Loading.gif)

    慕粉1814...

    非常感谢!

    2017-02-22 22:26:46

    共 1 条回复 >

  • Jason5014
    2017-02-19 19:01:52

    设置元素的内容为<img src='Images/Loading.gif' alt=''/>

jQuery基础(五)一Ajax应用与常用插件

如何用jquery实现ajax应用,加入学习,有效提高前端开发速度

69094 学习 · 400 问题

查看课程

相似问题