为了账号安全,请及时绑定邮箱和手机立即绑定

为什么没有效果

<!DOCTYPE html >

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <title>使用load()方法异步请求数据</title>

    <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>

    <link href="style.css" rel="stylesheet" type="text/css" />

</head>



<body>

<div id="divtest">

    <div class="title">

        <span class="fl">我最爱吃的水果</span>

        <span class="fr">

            <input id="btnShow" type="button" value="加载" />

        </span>

    </div>

    <ul></ul>

</div>



<script type="text/javascript">

    $(function(){

        $("#btnShow").bind("click", function () {

            var $this=$(this);

            $("ul")

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

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

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

                });

        })

    });

</script>

</body>

</html>


正在回答

1 回答

把jquery 文件的http改成 https

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
jQuery基础(五)一Ajax应用与常用插件
  • 参与学习       69096    人
  • 解答问题       400    个

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

进入课程

为什么没有效果

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信