還是代碼沒反應(yīng)的問題
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
? ? <head>
? ? ? ? <title>使用load()方法異步請(qǐng)求數(shù)據(jù)</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("http://idcbgp.cn/data/fruit_part.html",function(){
? ? ? ? ? ? ? ? ? ? ? ? $this.attr("disabled","true");
? ? ? ? ? ? ? ? ? ?});
? ? ? ? ? ? ? ? })
? ? ? ? ? ? });
? ? ? ? </script>
? ? </body>
</html>
看了很多提問都是跟這個(gè)有關(guān),但是沒看懂?
2018-09-28
<script src="https://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>? ?http加一個(gè)s
2018-10-12
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script> 這個(gè)http改成https
"http://idcbgp.cn/data/fruit_part.html"??? 這個(gè)http也改成https? 就有用了