XMLHttpRequest cannot load http://www.xianlaiwan.cn/data/sport.json.
XMLHttpRequest cannot load http://www.xianlaiwan.cn/data/sport.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
load和getJSON方法都有同樣的問題
2017-10-18
這個涉及到了跨域問題,我們電腦Ip是和慕課網不在一個ip和端口下,這個時候請求數據是會收到同源策略檢測,解決方法可以百度一下跨域