[英]How to retrieve yahoo basic chart of currency using javascript and json
I am quite new at javascript and web programming in general. 一般而言,我对javascript和网络编程还是比较陌生的。 I'm trying to make a basic chart of stock prices using the Google Visualization Chart API.I want to retrieve basic graph of currency rate using yahoo finance.
我正在尝试使用Google Visualization Chart API制作股价的基本图表。我想使用Yahoo Finance检索货币汇率的基本图表。
How do I read this finance data into a javascript object? 如何将财务数据读入javascript对象?
First of all, you can get a list of data which return by a String . 首先,您可以获得由String返回的数据列表。 for example:
例如:
data: "[stock1:{max:1,min:0,5,days:0.5}]";
I assume The callback method of request is 我假设请求的回调方法是
function callback (data){
var data = eval(data)//or eval(data.data) please use the javascript console to see the structure of response data
// data will become the javascript object
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.