来自Google财经的股票报价问题 [英] Problem with Stock Quote from Google Finance

查看:114
本文介绍了来自Google财经的股票报价问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我从google finance获取股票报价的示例。但它似乎并不工作。

Below is the example I got from google finance for a stock quote. But it doesnt seem to be working. Stock price isnt displayed.

感谢

<body>
Hello world!
Here is your portfolio:<br/>
  GOOG: <span id=_IG_SYM1_l></span> (<span id=_IG_SYM1_c></span>)<br/>
  AAPL: <span id=_IG_SYM2_l></span> (<span id=_IG_SYM2_c></span>)<br/>
  INTC: <span id=_IG_SYM3_l></span> (<span id=_IG_SYM3_c></span>)<br/>


<script type="text/javascript">
  var quote = new google.finance.Quote();
  quote.enableDomUpdates( { 'GOOG' : '_IG_SYM1', 'AAPL' : '_IG_SYM2', 
    'INTC' : '_IG_SYM3' } );

  quote.getQuotes(["GOOG", "AAPL", "INTC"]);
</script>


<!-- start: javascripts -->

<!-- end: javascripts -->
</body>


推荐答案

看起来您正在使用 http://code.google.com/apis/finance/docs/ finance-gadgets.html#JS_API 。如果我理解正确,该API仅适用于小工具。它说,

It looks like you are using the example at http://code.google.com/apis/finance/docs/finance-gadgets.html#JS_API . If I understand right, that API is only available to gadgets. It says,


使用Market Data API的小工具
只能在iGoogle中运行 - 或者是
生产iGoogle或iGoogle
沙箱。

"Gadgets that use the Market Data API can only run in iGoogle--either production iGoogle, or the iGoogle sandbox."

常规Google Finance JS API 仅允许您获取与用户投资组合相关的数据。

The regular Google Finance JS API only allows you to get data associated with a user's portfolio.

这篇关于来自Google财经的股票报价问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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