怎么沒反應(yīng)啊
怎么沒反應(yīng)????
<script type="text/javascript">
? ? ? ? ? ? $(function () {
? ? ? ? ? ? ? ? $("#btnShow").bind("click", function () {
? ? ? ? ? ? ? ? ? ? var $this = $(this);
? ? ? ? ? ? ? ? ? ? $.getJSON("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>");
? ? ? ? ? ? ? ? ? ? ? ? });
? ??
? ? ? ? ? ? ? ? ? ? });
? ? ? ? ? ? ? ? })
? ? ? ? ? ? });?
2018-03-14
加上s也沒反應(yīng),咋回???
2017-12-14
這里是url的問題,要在http這里加個(gè)s,就是用"http://idcbgp.cn/data/sport.json"。http的請求已被阻止,所以沒反應(yīng),內(nèi)容必須通過https提供。具體原因我還不清楚,如有懂這個(gè)原因的同學(xué),還請指教一下,謝謝~~~