這個是多余代碼嗎
? ? ? ? ? ? ? ? ? ? ? ? $.echo(data,function(index,sport){
? ? ? ? ? ? ? ? ? ? ? ? ? ? if(index == "1"){
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $("ul").append("<li>" + sport["name"] + "</li>");
? ? ? ? ? ? ? ? ? ? ? ? ? ? };
? ? ? ? ? ? ? ? ? ? ? ? });
在$.getScript("http://idcbgp.cn/data/sport_f.js",function(){
????????????$this.attr("disabled","true");
});中間 加不加上面那段代碼 效果是一樣的 為什么
2017-10-23
$.getScript() 就是執(zhí)行加載到的js文件,所以加了那段代碼也只是重復而已
2017-10-11
慕課君作弊哈哈
2017-08-10
http://idcbgp.cn/data/sport_f.js? 點進這個網(wǎng)址我才發(fā)現(xiàn) 原來在這個網(wǎng)址里面已經(jīng)定義了index=="1"了
ORZ