我正在try 创建一个可以下载并在本地运行的网站,方法是启动其索引文件.
所有文件都是本地文件,没有在线使用的资源.
当我try 使用jQuery的AJAXSLT插件处理带有XSL模板的XML文件(在子目录中)时,收到以下错误:
XMLHttpRequest cannot load file:///C:/path/to/XSL%20Website/data/home.xml. Origin null is not allowed by Access-Control-Allow-Origin.
个
XMLHttpRequest cannot load file:///C:/path/to/XSL%20Website/assets/xsl/main.xsl. Origin null is not allowed by Access-Control-Allow-Origin.
发出请求的索引文件是file:///C:/path/to/XSL%20Website/index.html
,而使用的JavaScript文件存储在file:///C:/path/to/XSL%20Website/assets/js/
.
我如何解决此问题?