简体   繁体   English

D3.js在IE9和firefox中访问本地文件

[英]D3.js Accessing local file in IE9 and firefox

While working with D3, the following code can access the contents of the .csv file in firefox but not in IE9. 在使用D3时,以下代码可以在firefox中访问.csv文件的内容,但不能在IE9中访问。

        d3.csv("cust_data.csv", function (csv) {})

cust_data.csv is in the same folder as the .html Can anyone suggest the reason for this. cust_data.csv与.html位于同一文件夹中,任何人都可以建议这样做的原因。 What can be done to access it in IE9? 如何在IE9中访问它?

It would be useful to know what error you are getting. 知道您遇到什么错误将很有用。 In the case it is given you some sort of permission/IO access error, I would assume the error is because you are not running it using a local web server. 在给您某种权限/ IO访问错误的情况下,我认为该错误是因为您没有使用本地Web服务器运行它。 A description of how to run the python web server can be found here 可以在此处找到有关如何运行python Web服务器的描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM