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");就会是这个结果 不信你们去试试

相关文章:

  • 2022-12-23
  • 2021-08-04
  • 2022-03-10
  • 2021-05-17
  • 2022-02-01
  • 2022-01-21
  • 2021-04-09
  • 2022-12-23
猜你喜欢
  • 2022-03-09
  • 2022-02-28
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
相关资源
相似解决方案