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控制台是这样的

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

这个错误是来自xhr.open(“get”,url,true);是来自这句代码  第三个参数是异步或者同步的  如果你来自参数 不小心传递成了字符串 就这样了

xhr.open("get",url,"true");就会是这个结果 不信你们去试试

相关文章:

  • 2021-10-19
  • 2021-11-27
  • 2021-08-14
  • 2021-11-16
  • 2021-12-29
  • 2021-12-25
  • 2021-12-17
  • 2018-01-24
猜你喜欢
  • 2021-06-30
  • 2021-12-30
  • 2021-10-16
  • 2021-11-12
  • 2021-09-24
  • 2021-08-09
  • 2021-12-26
  • 2021-08-05
相关资源
相似解决方案