AJAX的容易錯誤的地方
Ajax.html:35 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
Ajax @ Ajax.html:35
(anonymous) @ Ajax.html:58
在chrome控制台是這樣的
這個錯誤是來自xhr.open(“get”,url,true);是來自這句代碼 第三個參數是異步或者同步的 如果你來自參數 不小心傳遞成了字符串 就這樣了
xhr.open("get",url,"true");就會是這個結果 不信你們去試試