股票接口
獲取股票數(shù)據(jù)目前有如下兩種方法:
1.http/javascript接口取數(shù)據(jù)
2.web-service接口
Sina股票數(shù)據(jù)接口
Tencent股票數(shù)據(jù)接口
深成指:
<script type="text/javascript"src="http://hq.sinajs.cn/list=sz399001"charset="gb2312">
</script>
上證指:
<script type="text/javascript"src="http://hq.sinajs.cn/list=sh000001"charset="gb2312">
</script>
道瓊斯:
<script type="text/javascript"src="http://hq.sinajs.cn/list=int_dji"charset="gb2312">
</script>
納斯達克:
<script type="text/javascript"src="http://hq.sinajs.cn/list=int_nasdaq"charset="gb2312">
</script>
恒生指:
<script type="text/javascript"src="http://hq.sinajs.cn/list=int_hangseng"charset="gb2312">
</script>
日經(jīng)指數(shù):
<script type="text/javascript"src="http://hq.sinajs.cn/list=int_nikkei"charset="gb2312">
</script>
臺灣加權(quán):
<script type="text/javascript" src="http://hq.sinajs.cn/list=b_TWSE" charset="gb2312">
</script>
新加坡:
<script type="text/javascript"src="http://hq.sinajs.cn/list=b_FSSTI"charset="gb2312">
</script>
參考方法:
<script type="text/javascript">
var elements=hq_str_s_sh000001.split(",");
document.write(elements[3]);
document.write("%");
document.write(" ");
document.write(elements[1]);
</script>