XMLHttpRequest无法加载-文件footer.html,“错误:无法在'XMLHttpRequest'上执行'发送' [英] XMLHttpRequest cannot load - file footer.html, "Error: Failed to execute 'send' on 'XMLHttpRequest'

查看:97
本文介绍了XMLHttpRequest无法加载-文件footer.html,“错误:无法在'XMLHttpRequest'上执行'发送'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个相同的站点.我的第一个站点是 http://educationaboveall.org/,第二个站点是

I have two of the same site. My 1st site is http://educationaboveall.org/ and the 2nd is http://www.savantgenius.com .

第一个站点已正确加载到每个设备上,没有任何错误,但是第二个(www.savantgenius.com)站点未正确加载到移动设备和台式设备中.仅在桌面浏览器中正确加载.我还发现了32个控制台错误.

1st site is loading properly on every device without any error but the 2nd (www.savantgenius.com) site is not loading properly in mobile and table devices. It is only loading properly in desktop browser. I have also found 32 console error.

是否存在任何 jQuery 问题?并且请告诉我如何修复它.

Are there any jQuery issues? And please tell me how to be able to fix it.

我收到"XMLHttpRequest无法加载 file:///D:/Work%20File/My%20Work%20File/mY%20Work%20Backup/Sophie/Work%20File/footer.html. 仅HTTP支持跨源请求."和错误:失败 在"XMLHttpRequest"上执行发送":加载失败 'file:///D:/Work%20File/My%20Work%20File/mY%20Work%20Backup/Sophie/Work%20File/footer.html" 错误,但我不知道是什么原因造成的,也不知道如何解决.

I'm getting the "XMLHttpRequest cannot load file:///D:/Work%20File/My%20Work%20File/mY%20Work%20Backup/Sophie/Work%20File/footer.html. Cross origin requests are only supported for HTTP." and "Error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///D:/Work%20File/My%20Work%20File/mY%20Work%20Backup/Sophie/Work%20File/footer.html" error, but I don't know what's causing it nor how to fix it.

请查看屏幕截图- http://prntscr.com/4fm0d8

推荐答案

我认为您应该从http网络服务器调用它,而不是像浏览器中的简单文件那样.这意味着要从file:///E:/Projects/XML/catalog.html而不是从file:///E:/Projects/XML/catalog.html的Web服务器中请求文件.

I Think that you should call it from a http webserver and not like simple file in browser. This mean request a file in a web server like http://localhost/XML/catalog.html not from file:///E:/Projects/XML/catalog.html.

这篇关于XMLHttpRequest无法加载-文件footer.html,“错误:无法在'XMLHttpRequest'上执行'发送'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆