function(data), $.each(data, function (index, sport) 中為什么加入data?還有這個(gè)each()用法和前面教的不一樣?
$.getJSON(src="http://idcbgp.cn/data/sport.json",function(data){
? ? ? ? ? ? ? ? ? ? ? ? $this.attr("disabled", "true");
? ? ? ? ? ? ? ? ? ? ? ? $.each(data, function (index, sport) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? if(index==3)
? ? ? ? ? ? ? ? ? ? ? ? ? ? $("ul").append("<li>" + sport["name"] + "</li>");
2016-04-19
data ?就是那個(gè)json里的內(nèi)容,他是當(dāng)返回值用的?
2016-05-16
each 函數(shù)里面的sport代表的什么?
2016-04-19
這里的data是一個(gè)Json格式數(shù)據(jù)