1

我正在尝试将 Dygraph 加载到 Yahoo Finance CSV。我怎么会遇到跨域错误。是否有一种 ajax 方式来解决它,或者这种设置是不可避免的。

<html>
<head>
<script type="text/javascript"
  src="dygraph-combined.js"></script>
</head>
<body>
<div id="graphdiv3"
  style="width:500px; height:300px;"></div>
<script type="text/javascript">
  g3 = new Dygraph(
    document.getElementById("graphdiv3"),
    "http://finance.yahoo.com/d/quotes.csv?s=AAPL",
    {
      rollPeriod: 7,
      showRoller: true
    }
  );
</script>
</body>
</html>
4

0 回答 0