ajax 请求httsk url地址 ,无法获取success后的数据.

1.在测试机为https的url路径.没有走success:function(data){}里面.
2.本地走localhost访问没问题.
3.页面报错
jquery.min.js:4 [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/.

阅读 4.1k
1 个回答

你的ajax必然是用的同步,ajax请求分为同步和异步,你如果用同步的方式,就要等待ajax返回数据之后才能继续执行后面的内容,这会严重阻塞页面,非常影响用户体验,所以不要用同步的ajax请求

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题