為什么不顯示
$("btnShow").bind("click",function(){ ? ? ? ? ? ? ? ? ? var $this = $(this); ? ? ? ? ? ? ? ? ? $.getScript("http://idcbgp.cn/data/sport_f.js",function(){ ? ? ? ? ? ? ? ? ? ? ? $this.attr("disabled", "true"); ? ? ? ? ? ? ? ? ? }); ? ? ? ? ? ? ? }) ? ? ? ? ? }); 沒被注釋的是我自己重新寫的,為什么不顯示
2016-05-06
?<script type="text/javascript">
? ? ? ? ? ? $(function () {
? ? ? ? ? ? ? ? $("#btnShow").bind("click", function () {
? ? ? ? ? ? ? ? ? ? var $this = $(this);
? ? ? ? ? ? ? ? ? ? $.getScript("http://idcbgp.cn/data/sport_f.js",function() {
? ? ? ? ? ? ? ? ? ? ? ? $this.attr("disabled", "true");
? ? ? ? ? ? ? ? ? ? });
? ? ? ? ? ? ? ? })
? ? ? ? ? ? });
? ? ? ? </script>
2016-04-13
你這里有兩個問題:
選擇按鈕的時候應該是按照id 來選 ?那么要加 “#”,$("btnShow").bind 你這么寫是沒有選到按鈕的
我不確定你有沒有在最外層寫 $(function(){}) ?如果沒有寫的話,你這里的 “})”多了一個,匹配會出問題
2016-03-31
$("#btnShow").bind("click",function(){ ?