為什么沒有反應(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").click(function(){
????????????????? var tis=$(this);
????????????????? $("ul").html("<img src='Images/Loading.gif' alt=''/>")
????????????????? .load("http://idcbgp.cn/data/fruit_part.html",function(){
????????????????????? tis.attr("disabled","true");
????????????????? });
??????????????? });
??????????? });
??????? </script>
??? </body>
</html>
2017-02-23
我復(fù)制在慕課網(wǎng)上運(yùn)行,成功了啊~
2017-01-11
我換下瀏覽器試試看 等等哈
2017-01-11
? ?var $tis=$(this); ?這句也有問題吧
2017-01-11
換成onclick試試?
2017-01-11
還是不行,按了按鈕沒反應(yīng)
2017-01-11
? $this.attr("disabled", "true");