[JS]东方财富网财经数据汇总代码示例

时间:2024-12-16 08:05:37

把握全球金融状况

一个页面看全球金融,感觉不错

再加上以前做的,读取显示 新浪7*24财经直播数据页面

那看得就更舒服了

下面是 新浪7*24财经直播数据 代码地址:

http://www.cnblogs.com/wangxinsheng/articles/4251228.html

效果图:

展开前

[JS]东方财富网财经数据汇总代码示例

展开后

[JS]东方财富网财经数据汇总代码示例

新浪7*24财经直播数据:在线Demo http://wangxinsheng.herokuapp.com/sinaFinLive

东方财富网财经数据汇总:在线Demo http://wangxinsheng.herokuapp.com/test

代码:

简单来说,就是使用jquery 的$.getScript()方法加载数据文件,在显示在页面上而已

现在的显示方法不好,比较冗余

因为数据格式相同,并且数据的名称也传了回来,其实可以一个循环搞定所有的数据

以后新加数据也就只用添加数据URL即可。

我太懒,不想改了,脑袋里的伪代码如下:

1.html单节点字符串,用于append到画面

2.循环数据url数组,获取数据(url里可以定义返回的数据放在那个变量里)

3.$.getScript的callBack里面,解析数据(目前不同指数,数据格式是一样的),可以一个方法解决

4.替换html单节点字符串的数据部分,append到画面

5.细节需要打磨一下,比如:如何append[我第一个想到的是:先看是否存在。存在的话,通过class标记并隐藏现有的节点后,在现有节点之前插入新节点,然后移除旧的节点即可......大家实现方法各有不同]

下面是目前的代码:[那是傻乎乎的用nodejs模拟referer,访问数据来源,而页面上则用json向nodejs请求数据。这种模式适合来抓去html页面上的数据。对于现在的情况,就大材小用,还浪费了服务器资源......]

 <!DOCTYPE html>
<html>
<head>
<title>财经数据汇总</title>
<meta charset='UTF-8'>
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<style>
body { font-size:12px; margin:0px 0px;}
.outDiv {margin:0px 0px;}
ul {padding:0px;margin:0px;}
ul { list-style:none; /*margin-left:-40px;*/}
.bgWhite { background-color:white/*#FBD9F0*/;color:black;}
.bgBlue { background-color:#C3F7FF;color:black;}
.bgGray { background-color:#F2F2F2;color:black;}
.bgBlue2 { background-color:#E2FBFF;color:black;}
.bold{ font-weight:bold;}
.colorRed {color:red;}
.colorGreen {color:green;}
.colorGray {color:gray;}
.ul,.ul li {line-height:20px; cursor:pointer;}
.ul ul {margin-top:0px;margin-bottom:0px;}
.floatL {float:left;}
.floatR {float:right;}
.li_t1_1{width:80px; display:inline; float:left;}
.li_d1_1{width:100px; display:inline; float:left;}
.li_d1_2{width:90px; display:inline; float:left;}
.li_de_t{width:100px; display:inline; float:left;}
/*.li_pic{height:100%;}*/
.li_de_pic{display:inline; float:left;}
.clear{clear:both;}
.smallPic{width:150px; margin-left:10px;}
.opp{border-radius:20px 20px 0px 0px;font-size:10px; text-align:center; background-color:gray;color:white;}
.opp span{cursor:pointer;}
</style>
</head>
<body>
<div class='opp'><span id='openAll'>全部展开</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id='closeAll'>全部折叠</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id='doRefresh'>刷新</span>&nbsp;<span id='ntime'></span></div>
<div class='outDiv'>
<div class='ul bgWhite'>道琼斯: <span class='DQSnowN'>--.--</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class='DQSnowP'>--.--</span><span style='position:absolute;right:10px;'>美股</span> <ul style='display:none'>
<!--道琼斯Start-->
<li>
<div class='ul bgGray'>
<div class='li_t1_1'>道琼斯:</div>
<div class='li_d1_1 DQSnowN'>--.--</div>
<div class='li_d1_1 DQSnowV'>--.--</div>
<div class='li_d1_1 DQSnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t DQSnowO'>--.--</div>
<div class='li_de_t DQSnowL'>--.--</div>
<div class='li_de_t DQSnowH'>--.--</div>
<div class='li_de_t DQSnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic DQSpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic DQSpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--道琼斯End-->
<!--纳斯达克Start-->
<li>
<div class='ul bgWhite'>
<div class='li_t1_1'>纳斯达克:</div>
<div class='li_d1_1 NSDKnowN'>--.--</div>
<div class='li_d1_1 NSDKnowV'>--.--</div>
<div class='li_d1_1 NSDKnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t NSDKnowO'>--.--</div>
<div class='li_de_t NSDKnowL'>--.--</div>
<div class='li_de_t NSDKnowH'>--.--</div>
<div class='li_de_t NSDKnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic NSDKpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic NSDKpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--纳斯达克End-->
<!--标准500Start-->
<li>
<div class='ul bgGray'>
<div class='li_t1_1'>标准500:</div>
<div class='li_d1_1 BZ500nowN'>--.--</div>
<div class='li_d1_1 BZ500nowV'>--.--</div>
<div class='li_d1_1 BZ500nowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t BZ500nowO'>--.--</div>
<div class='li_de_t BZ500nowL'>--.--</div>
<div class='li_de_t BZ500nowH'>--.--</div>
<div class='li_de_t BZ500nowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic BZ500picTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic BZ500picDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--标准500End-->
</ul> </div>
<div class='ul bgBlue'>美黄金: <span class='MHJnowN'>--.--</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class='MHJnowP'>--.--</span><span style='position:absolute;right:10px;'>贵金属</span> <ul style='display:none'>
<!--美黄金Start-->
<li>
<div class='ul bgBlue2'>
<div class='li_t1_1'>美黄金:</div>
<div class='li_d1_1 MHJnowN'>--.--</div>
<div class='li_d1_1 MHJnowV'>--.--</div>
<div class='li_d1_1 MHJnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t MHJnowO'>--.--</div>
<div class='li_de_t MHJnowL'>--.--</div>
<div class='li_de_t MHJnowH'>--.--</div>
<div class='li_de_t MHJnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic MHJpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic MHJpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--美黄金End-->
<!--白银指数Start-->
<li>
<div class='ul bgBlue'>
<div class='li_t1_1'>白银指数:</div>
<div class='li_d1_1 BYZSnowN'>--.--</div>
<div class='li_d1_1 BYZSnowV'>--.--</div>
<div class='li_d1_1 BYZSnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t BYZSnowO'>--.--</div>
<div class='li_de_t BYZSnowL'>--.--</div>
<div class='li_de_t BYZSnowH'>--.--</div>
<div class='li_de_t BYZSnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic BYZSpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic BYZSpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--白银指数End-->
<!--沪金主力Start-->
<li>
<div class='ul bgBlue2'>
<div class='li_t1_1'>沪金主力:</div>
<div class='li_d1_1 HJZLnowN'>--.--</div>
<div class='li_d1_1 HJZLnowV'>--.--</div>
<div class='li_d1_1 HJZLnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t HJZLnowO'>--.--</div>
<div class='li_de_t HJZLnowL'>--.--</div>
<div class='li_de_t HJZLnowH'>--.--</div>
<div class='li_de_t HJZLnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic HJZLpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic HJZLpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--沪金主力End-->
</ul>
</div>
<div class='ul bgWhite'>美元指数: <span class='MYZSnowN'>--.--</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class='MYZSnowP'>--.--</span><span style='position:absolute;right:10px;'>外汇</span>
<ul style='display:none'>
<!--美元指数Start-->
<li>
<div class='ul bgGray'>
<div class='li_t1_1'>美黄指数:</div>
<div class='li_d1_1 MYZSnowN'>--.--</div>
<div class='li_d1_1 MYZSnowV'>--.--</div>
<div class='li_d1_1 MYZSnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t MYZSnowO'>--.--</div>
<div class='li_de_t MYZSnowL'>--.--</div>
<div class='li_de_t MYZSnowH'>--.--</div>
<div class='li_de_t MYZSnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic MYZSpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic MYZSpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--美元指数End-->
<!--美中Start-->
<li>
<div class='ul bgWhite'>
<div class='li_t1_1'>美元人民币:</div>
<div class='li_d1_1 USDCNYnowN'>--.--</div>
<div class='li_d1_1 USDCNYnowV'>--.--</div>
<div class='li_d1_1 USDCNYnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t USDCNYnowO'>--.--</div>
<div class='li_de_t USDCNYnowL'>--.--</div>
<div class='li_de_t USDCNYnowH'>--.--</div>
<div class='li_de_t USDCNYnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic USDCNYpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic USDCNYpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--美中End-->
<!--中日Start-->
<li>
<div class='ul bgGray'>
<div class='li_t1_1'>人民币日元:</div>
<div class='li_d1_1 CNYJPYnowN'>--.--</div>
<div class='li_d1_1 CNYJPYnowV'>--.--</div>
<div class='li_d1_1 CNYJPYnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t CNYJPYnowO'>--.--</div>
<div class='li_de_t CNYJPYnowL'>--.--</div>
<div class='li_de_t CNYJPYnowH'>--.--</div>
<div class='li_de_t CNYJPYnowYC'>--.--</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--中日End-->
<!--日中Start-->
<li>
<div class='ul bgWhite'>
<div class='li_t1_1'>日元人民币:</div>
<div class='li_d1_1 JPYCNYnowN'>--.--</div>
<div class='li_d1_1 JPYCNYnowV'>--.--</div>
<div class='li_d1_1 JPYCNYnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t JPYCNYnowO'>--.--</div>
<div class='li_de_t JPYCNYnowL'>--.--</div>
<div class='li_de_t JPYCNYnowH'>--.--</div>
<div class='li_de_t JPYCNYnowYC'>--.--</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--日中End-->
<!--美欧Start-->
<li>
<div class='ul bgGray'>
<div class='li_t1_1'>美元欧元:</div>
<div class='li_d1_1 USDEURnowN'>--.--</div>
<div class='li_d1_1 USDEURnowV'>--.--</div>
<div class='li_d1_1 USDEURnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t USDEURnowO'>--.--</div>
<div class='li_de_t USDEURnowL'>--.--</div>
<div class='li_de_t USDEURnowH'>--.--</div>
<div class='li_de_t USDEURnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic USDEURpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic USDEURpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--美欧End-->
</ul>
</div>
<div class='ul bgBlue'>原油指数: <span class='YYnowN'>--.--</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class='YYnowP'>--.--</span><span style='position:absolute;right:10px;'>期货</span>
<ul style='display:none'>
<!--原油指数Start-->
<li>
<div class='ul bgBlue2'>
<div class='li_t1_1'>原油指数:</div>
<div class='li_d1_1 YYnowN'>--.--</div>
<div class='li_d1_1 YYnowV'>--.--</div>
<div class='li_d1_1 YYnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t YYnowO'>--.--</div>
<div class='li_de_t YYnowL'>--.--</div>
<div class='li_de_t YYnowH'>--.--</div>
<div class='li_de_t YYnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic YYpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic YYpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--原油指数End-->
<!--IF001Start-->
<li>
<div class='ul bgBlue'>
<div class='li_t1_1'><span class='IF001Name'>IF001</span>:</div>
<div class='li_d1_1 IF001nowN'>--.--</div>
<div class='li_d1_1 IF001nowV'>--.--</div>
<div class='li_d1_1 IF001nowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t IF001nowO'>--.--</div>
<div class='li_de_t IF001nowL'>--.--</div>
<div class='li_de_t IF001nowH'>--.--</div>
<div class='li_de_t IF001nowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic IF001picTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic IF001picDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--IF001End-->
<!--IF002Start-->
<li>
<div class='ul bgBlue2'>
<div class='li_t1_1'><span class='IF002Name'>IF002</span>:</div>
<div class='li_d1_1 IF002nowN'>--.--</div>
<div class='li_d1_1 IF002nowV'>--.--</div>
<div class='li_d1_1 IF002nowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t IF002nowO'>--.--</div>
<div class='li_de_t IF002nowL'>--.--</div>
<div class='li_de_t IF002nowH'>--.--</div>
<div class='li_de_t IF002nowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic IF002picTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic IF002picDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--IF002End-->
</ul>
</div>
<div class='ul bgWhite'>上证综指: <span class='SZZSnowN'>--.--</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class='SZZSnowP'>--.--</span><span style='position:absolute;right:10px;'>A 股</span>
<ul style='display:none'>
<!--上证指数Start-->
<li>
<div class='ul bgGray'>
<div class='li_t1_1'>上证指数:</div>
<div class='li_d1_1 SZZSnowN'>--.--</div>
<div class='li_d1_1 SZZSnowV'>--.--</div>
<div class='li_d1_1 SZZSnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t SZZSnowO'>--.--</div>
<div class='li_de_t SZZSnowL'>--.--</div>
<div class='li_de_t SZZSnowH'>--.--</div>
<div class='li_de_t SZZSnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic SZZSpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic SZZSpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--上证指数End-->
<!--深证成指Start-->
<li>
<div class='ul bgWhite'>
<div class='li_t1_1'>深证成指:</div>
<div class='li_d1_1 SZCZnowN'>--.--</div>
<div class='li_d1_1 SZCZnowV'>--.--</div>
<div class='li_d1_1 SZCZnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t SZCZnowO'>--.--</div>
<div class='li_de_t SZCZnowL'>--.--</div>
<div class='li_de_t SZCZnowH'>--.--</div>
<div class='li_de_t SZCZnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic SZCZpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic SZCZpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--深证成指End-->
<!--沪深300Start-->
<li>
<div class='ul bgGray'>
<div class='li_t1_1'>沪深300:</div>
<div class='li_d1_1 HS300nowN'>--.--</div>
<div class='li_d1_1 HS300nowV'>--.--</div>
<div class='li_d1_1 HS300nowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t HS300nowO'>--.--</div>
<div class='li_de_t HS300nowL'>--.--</div>
<div class='li_de_t HS300nowH'>--.--</div>
<div class='li_de_t HS300nowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic HS300picTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic HS300picDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--沪深300End-->
<!--中小板指Start-->
<li>
<div class='ul bgWhite'>
<div class='li_t1_1'>中小板指:</div>
<div class='li_d1_1 ZXBZnowN'>--.--</div>
<div class='li_d1_1 ZXBZnowV'>--.--</div>
<div class='li_d1_1 ZXBZnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t ZXBZnowO'>--.--</div>
<div class='li_de_t ZXBZnowL'>--.--</div>
<div class='li_de_t ZXBZnowH'>--.--</div>
<div class='li_de_t ZXBZnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic ZXBZpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic ZXBZpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--中小板指End-->
<!--创业板指Start-->
<li>
<div class='ul bgGray'>
<div class='li_t1_1'>创业板指:</div>
<div class='li_d1_1 CYBZnowN'>--.--</div>
<div class='li_d1_1 CYBZnowV'>--.--</div>
<div class='li_d1_1 CYBZnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t CYBZnowO'>--.--</div>
<div class='li_de_t CYBZnowL'>--.--</div>
<div class='li_de_t CYBZnowH'>--.--</div>
<div class='li_de_t CYBZnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic CYBZpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic CYBZpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--创业板指End-->
</ul>
</div>
<div class='ul bgBlue'>恒生指数: <span class='HSZSnowN'>--.--</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class='HSZSnowP'>--.--</span><span style='position:absolute;right:10px;'>港股</span>
<ul style='display:none'>
<!--恒生指数Start-->
<li>
<div class='ul bgBlue2'>
<div class='li_t1_1'>恒生指数:</div>
<div class='li_d1_1 HSZSnowN'>--.--</div>
<div class='li_d1_1 HSZSnowV'>--.--</div>
<div class='li_d1_1 HSZSnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t HSZSnowO'>--.--</div>
<div class='li_de_t HSZSnowL'>--.--</div>
<div class='li_de_t HSZSnowH'>--.--</div>
<div class='li_de_t HSZSnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic HSZSpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic HSZSpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--恒生指数End-->
<!--国企指数Start-->
<li>
<div class='ul bgBlue'>
<div class='li_t1_1'>国企指数:</div>
<div class='li_d1_1 GQZSnowN'>--.--</div>
<div class='li_d1_1 GQZSnowV'>--.--</div>
<div class='li_d1_1 GQZSnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t GQZSnowO'>--.--</div>
<div class='li_de_t GQZSnowL'>--.--</div>
<div class='li_de_t GQZSnowH'>--.--</div>
<div class='li_de_t GQZSnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic GQZSpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic GQZSpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--国企指数End-->
<!--红筹指数Start-->
<li>
<div class='ul bgBlue2'>
<div class='li_t1_1'>红筹指数:</div>
<div class='li_d1_1 HCZSnowN'>--.--</div>
<div class='li_d1_1 HCZSnowV'>--.--</div>
<div class='li_d1_1 HCZSnowP'>--.--%</div>
<div class='clear'></div>
<ul style='display:none'>
<li>
<div class='li_de_t HCZSnowO'>--.--</div>
<div class='li_de_t HCZSnowL'>--.--</div>
<div class='li_de_t HCZSnowH'>--.--</div>
<div class='li_de_t HCZSnowYC'>--.--</div>
<div class='clear'></div>
</li>
<li>
<div class='li_de_pic'>
<img class='smallPic HCZSpicTime' />
</div>
<div class='li_de_pic'>
<img class='smallPic HCZSpicDay' />
</div>
<div class='clear'></div>
</li>
</ul>
</div>
</li>
<!--红筹指数End-->
</ul>
</div>
</div>
<script>
function getData(){
loadScript('AjaxDataAG',AjaxDataAGUrl,showAjaxDataAG);
loadScript('AjaxDataIF',AjaxDataIFUrl,showAjaxDataIF);
loadScript('AjaxDataYY',AjaxDataYYUrl,showAjaxDataYY);
loadScript('AjaxDataGG',AjaxDataGGUrl,showAjaxDataGG);
loadScript('AjaxDataBZ500',AjaxDataBZ500Url,showAjaxDataBZ500);
loadScript('AjaxDataNSDK',AjaxDataNSDKUrl,showAjaxDataNSDK);
loadScript('AjaxDataDQS',AjaxDataDQSUrl,showAjaxDataDQS);
loadScript('AjaxDataWHHL',AjaxDataWHHLUrl,showAjaxDataWHHL);
loadScript('AjaxDataMYZS',AjaxDataMYZSUrl,showAjaxDataMYZS);
loadScript('AjaxDataHZLJ',AjaxDataHZLJUrl,showAjaxDataHZLJ);
loadScript('AjaxDataJY',AjaxDataJYUrl,showAjaxDataJY);
}
$(function(){
getData();
var refreshTime = 10000;
setInterval(getData,refreshTime);
/*data init over*/ $('.ul li').click(function(e){
e.stopPropagation();
}); $('.ul').click(function(e){
if($(this).find('ul').length>0 && $(this).find('ul').eq(0).is(":visible")){
$(this).find('ul').eq(0).hide();
}else{
$(this).find('ul').eq(0).show();
}
e.stopPropagation();
}); $('#openAll').click(function(e){
$('.ul').each(function(i){
if($(this).find('ul').length>0){
$(this).find('ul').eq(0).show();
}
});
});
$('#closeAll').click(function(e){
$('.ul').each(function(i){
if($(this).find('ul').length>0){
$(this).find('ul').eq(0).hide();
}
});
});
$('#doRefresh').click(function(e){window.location.reload();});
$('#ntime').html((new Date()).toLocaleTimeString());
}); function loadScript(id,url,callBack){
$.getScript(url+"&dt="+new Date().getTime(),callBack);
}
//美黄金
var AjaxDataJYUrl = 'http://hq2gjqh.eastmoney.com/EM_Futures2010NumericApplication/index.aspx?type=z&jsName=DataJY&Reference=rtj&ids=GLNC0,SLNC0';
//沪主力金
var AjaxDataHZLJUrl = 'http://hq2gnqh.eastmoney.com/EM_Futures2010NumericApplication/index.aspx?type=z&jsName=DataHZLJ&sortType=A&reference=rtj&sortRule=1&jsSort=1&ids=AUM1';
//美元指数
var AjaxDataMYZSUrl = 'http://hq2gjqh.eastmoney.com/em_futures2010numericapplication/index.aspx?type=f&jsName=DataMYZS&id=DINI0';
//汇率
var AjaxDataWHHLUrl = 'http://hq2gjqh.eastmoney.com/EM_Futures2010NumericApplication/Index.aspx?type=z&jsName=DataWHHL&ids=USDCNY0,JPYCNY0,jpcny0,USDEUR0';
//道琼斯
var AjaxDataDQSUrl = 'http://hq2gjgp.eastmoney.com/EM_Quote2010NumericApplication/Index.aspx?jsName=DataDQS&reference=rtj&type=f&id=INDU7';
//纳斯达克
var AjaxDataNSDKUrl = 'http://hq2gjgp.eastmoney.com/EM_Quote2010NumericApplication/Index.aspx?jsName=DataNSDK&reference=rtj&type=f&id=CCMP7';
//标准500
var AjaxDataBZ500Url = 'http://hq2gjgp.eastmoney.com/EM_Quote2010NumericApplication/Index.aspx?jsName=DataBZ500&reference=rtj&type=f&id=SPX7';
//港股
var AjaxDataGGUrl = 'http://hq2hk.eastmoney.com/EM_Quote2010NumericApplication/Index.aspx?reference=rtj&type=z&jsName=DataGG&ids=1100005,1100105,1100305';
//原油
var AjaxDataYYUrl = 'http://hq2gjqh.eastmoney.com/em_futures2010numericapplication/index.aspx?type=f&jsName=DataYY&id=CONC0';
//IF
var AjaxDataIFUrl = 'http://hq2gnqh.eastmoney.com/EM_Futures2010NumericApplication/index.aspx?type=s&jsName=DataIF&style=12&sortType=A&sortRule=1&page=1&pageSize=2';
//A股
var AjaxDataAGUrl = 'http://hqdigi2.eastmoney.com/EM_Quote2010NumericApplication/Index.aspx?type=z&sortType=C&sortRule=-1&jsSort=1&jsName=DataAG&ids=0000011,3990012,0003001,3990052,3990062'; function showAjaxDataAG(){
if(!DataAG){return;}
var refreshTime = 10000;
/*上证指数Start*/
var SZZSData = DataAG.quotation[0].split(",");
var SZZSOpen = SZZSData[4];
var SZZSLow = SZZSData[7];
var SZZSHigh = SZZSData[6];
var SZZSNow = SZZSData[5];
var SZZSYClose = SZZSData[3];
var SZZSClass = SZZSNow>SZZSYClose?"colorRed":(SZZSNow<SZZSYClose?"colorGreen":"colorGray");
var SZZSOClass = SZZSOpen>SZZSYClose?"colorRed":(SZZSOpen<SZZSYClose?"colorGreen":"colorGray");
var SZZSLClass = SZZSLow>SZZSYClose?"colorRed":(SZZSLow<SZZSYClose?"colorGreen":"colorGray");
var SZZSHClass = SZZSHigh>SZZSYClose?"colorRed":(SZZSHigh<SZZSYClose?"colorGreen":"colorGray");
$('.SZZSnowO').html("开盘: <font class='bold "+SZZSOClass+"'>"+SZZSOpen+"</font>");
$('.SZZSnowL').html("最低: <font class='bold "+SZZSLClass+"'>"+SZZSLow+"</font>");
$('.SZZSnowH').html("最高: <font class='bold "+SZZSHClass+"'>"+SZZSHigh+"</font>");
$('.SZZSnowYC').html("昨收: <font class='bold colorGray'>"+SZZSYClose+"</font>");
$('.SZZSnowN').html("现价: <font class='bold "+SZZSClass+"'>"+SZZSNow+"</font>");
$('.SZZSnowV').html(
"涨跌额: <font class='bold "+SZZSClass+"'>"
+Math.round((SZZSNow-SZZSYClose)*100)/100
+"</font>"
);
$('.SZZSnowP').html(
"涨跌幅: <font class='bold "+SZZSClass+"'>"
+Math.round(((SZZSNow-SZZSYClose)/SZZSYClose*100)*100)/100
+ " %"+"</font>"
);
/*上证指数End*/
/*深证成指Start*/
var SZCZData = DataAG.quotation[1].split(",");
var SZCZOpen = SZCZData[4];
var SZCZLow = SZCZData[7];
var SZCZHigh = SZCZData[6];
var SZCZNow = SZCZData[5];
var SZCZYClose = SZCZData[3];
var SZCZClass = SZCZNow>SZCZYClose?"colorRed":(SZCZNow<SZCZYClose?"colorGreen":"colorGray");
var SZCZOClass = SZCZOpen>SZCZYClose?"colorRed":(SZCZOpen<SZCZYClose?"colorGreen":"colorGray");
var SZCZLClass = SZCZLow>SZCZYClose?"colorRed":(SZCZLow<SZCZYClose?"colorGreen":"colorGray");
var SZCZHClass = SZCZHigh>SZCZYClose?"colorRed":(SZCZHigh<SZCZYClose?"colorGreen":"colorGray");
$('.SZCZnowO').html("开盘: <font class='bold "+SZCZOClass+"'>"+SZCZOpen+"</font>");
$('.SZCZnowL').html("最低: <font class='bold "+SZCZLClass+"'>"+SZCZLow+"</font>");
$('.SZCZnowH').html("最高: <font class='bold "+SZCZHClass+"'>"+SZCZHigh+"</font>");
$('.SZCZnowYC').html("昨收: <font class='bold colorGray'>"+SZCZYClose+"</font>");
$('.SZCZnowN').html("现价: <font class='bold "+SZCZClass+"'>"+SZCZNow+"</font>");
$('.SZCZnowV').html(
"涨跌额: <font class='bold "+SZCZClass+"'>"
+Math.round((SZCZNow-SZCZYClose)*100)/100
+"</font>"
);
$('.SZCZnowP').html(
"涨跌幅: <font class='bold "+SZCZClass+"'>"
+Math.round(((SZCZNow-SZCZYClose)/SZCZYClose*100)*100)/100
+ " %"+"</font>"
);
/*深证成指End*/
/*沪深300Start*/
var HS300Data = DataAG.quotation[2].split(",");
var HS300Open = HS300Data[4];
var HS300Low = HS300Data[7];
var HS300High = HS300Data[6];
var HS300Now = HS300Data[5];
var HS300YClose = HS300Data[3];
var HS300Class = HS300Now>HS300YClose?"colorRed":(HS300Now<HS300YClose?"colorGreen":"colorGray");
var HS300OClass = HS300Open>HS300YClose?"colorRed":(HS300Open<HS300YClose?"colorGreen":"colorGray");
var HS300LClass = HS300Low>HS300YClose?"colorRed":(HS300Low<HS300YClose?"colorGreen":"colorGray");
var HS300HClass = HS300High>HS300YClose?"colorRed":(HS300High<HS300YClose?"colorGreen":"colorGray");
$('.HS300nowO').html("开盘: <font class='bold "+HS300OClass+"'>"+HS300Open+"</font>");
$('.HS300nowL').html("最低: <font class='bold "+HS300LClass+"'>"+HS300Low+"</font>");
$('.HS300nowH').html("最高: <font class='bold "+HS300HClass+"'>"+HS300High+"</font>");
$('.HS300nowYC').html("昨收: <font class='bold colorGray'>"+HS300YClose+"</font>");
$('.HS300nowN').html("现价: <font class='bold "+HS300Class+"'>"+HS300Now+"</font>");
$('.HS300nowV').html(
"涨跌额: <font class='bold "+HS300Class+"'>"
+Math.round((HS300Now-HS300YClose)*100)/100
+"</font>"
);
$('.HS300nowP').html(
"涨跌幅: <font class='bold "+HS300Class+"'>"
+Math.round(((HS300Now-HS300YClose)/HS300YClose*100)*100)/100
+ " %"+"</font>"
);
/*沪深300End*/
/*中小板指Start*/
var ZXBZData = DataAG.quotation[3].split(",");
var ZXBZOpen = ZXBZData[4];
var ZXBZLow = ZXBZData[7];
var ZXBZHigh = ZXBZData[6];
var ZXBZNow = ZXBZData[5];
var ZXBZYClose = ZXBZData[3];
var ZXBZClass = ZXBZNow>ZXBZYClose?"colorRed":(ZXBZNow<ZXBZYClose?"colorGreen":"colorGray");
var ZXBZOClass = ZXBZOpen>ZXBZYClose?"colorRed":(ZXBZOpen<ZXBZYClose?"colorGreen":"colorGray");
var ZXBZLClass = ZXBZLow>ZXBZYClose?"colorRed":(ZXBZLow<ZXBZYClose?"colorGreen":"colorGray");
var ZXBZHClass = ZXBZHigh>ZXBZYClose?"colorRed":(ZXBZHigh<ZXBZYClose?"colorGreen":"colorGray");
$('.ZXBZnowO').html("开盘: <font class='bold "+ZXBZOClass+"'>"+ZXBZOpen+"</font>");
$('.ZXBZnowL').html("最低: <font class='bold "+ZXBZLClass+"'>"+ZXBZLow+"</font>");
$('.ZXBZnowH').html("最高: <font class='bold "+ZXBZHClass+"'>"+ZXBZHigh+"</font>");
$('.ZXBZnowYC').html("昨收: <font class='bold colorGray'>"+ZXBZYClose+"</font>");
$('.ZXBZnowN').html("现价: <font class='bold "+ZXBZClass+"'>"+ZXBZNow+"</font>");
$('.ZXBZnowV').html(
"涨跌额: <font class='bold "+ZXBZClass+"'>"
+Math.round((ZXBZNow-ZXBZYClose)*100)/100
+"</font>"
);
$('.ZXBZnowP').html(
"涨跌幅: <font class='bold "+ZXBZClass+"'>"
+Math.round(((ZXBZNow-ZXBZYClose)/ZXBZYClose*100)*100)/100
+ " %"+"</font>"
);
/*中小板指End*/
/*创业板指Start*/
var CYBZData = DataAG.quotation[4].split(",");
var CYBZOpen = CYBZData[4];
var CYBZLow = CYBZData[7];
var CYBZHigh = CYBZData[6];
var CYBZNow = CYBZData[5];
var CYBZYClose = CYBZData[3];
var CYBZClass = CYBZNow>CYBZYClose?"colorRed":(CYBZNow<CYBZYClose?"colorGreen":"colorGray");
var CYBZOClass = CYBZOpen>CYBZYClose?"colorRed":(CYBZOpen<CYBZYClose?"colorGreen":"colorGray");
var CYBZLClass = CYBZLow>CYBZYClose?"colorRed":(CYBZLow<CYBZYClose?"colorGreen":"colorGray");
var CYBZHClass = CYBZHigh>CYBZYClose?"colorRed":(CYBZHigh<CYBZYClose?"colorGreen":"colorGray");
$('.CYBZnowO').html("开盘: <font class='bold "+CYBZOClass+"'>"+CYBZOpen+"</font>");
$('.CYBZnowL').html("最低: <font class='bold "+CYBZLClass+"'>"+CYBZLow+"</font>");
$('.CYBZnowH').html("最高: <font class='bold "+CYBZHClass+"'>"+CYBZHigh+"</font>");
$('.CYBZnowYC').html("昨收: <font class='bold colorGray'>"+CYBZYClose+"</font>");
$('.CYBZnowN').html("现价: <font class='bold "+CYBZClass+"'>"+CYBZNow+"</font>");
$('.CYBZnowV').html(
"涨跌额: <font class='bold "+CYBZClass+"'>"
+Math.round((CYBZNow-CYBZYClose)*100)/100
+"</font>"
);
$('.CYBZnowP').html(
"涨跌幅: <font class='bold "+CYBZClass+"'>"
+Math.round(((CYBZNow-CYBZYClose)/CYBZYClose*100)*100)/100
+ " %"+"</font>"
);
/*创业板指End*/
//setTimeout(loadScript('AjaxDataAG',AjaxDataAGUrl,showAjaxDataAG),refreshTime); // img data
/*上证指数*/
$('.SZZSpicTime').attr("src","http://hqpiczs.dfcfw.com/EM_Quote2010PictureProducter/Picture/0000011RsIndex.png?dt="+new Date().getTime());
$('.SZZSpicDay').attr("src","http://hqpick.eastmoney.com/k/0000011.png?dt="+new Date().getTime());
/*深证成指*/
$('.SZCZpicTime').attr("src","http://hqpiczs.dfcfw.com/EM_Quote2010PictureProducter/Picture/3990012RsIndex.png?dt="+new Date().getTime());
$('.SZCZpicDay').attr("src","http://hqpick.eastmoney.com/k/3990012.png?dt="+new Date().getTime());
/*沪深300指*/
$('.HS300picTime').attr("src","http://hqpiczs.dfcfw.com/EM_Quote2010PictureProducter/Picture/0003001RsIndex.png?dt="+new Date().getTime());
$('.HS300picDay').attr("src","http://hqpick.eastmoney.com/k/0003001.png?dt="+new Date().getTime());
/*中小板指*/
$('.ZXBZpicTime').attr("src","http://hqpiczs.dfcfw.com/EM_Quote2010PictureProducter/Picture/3990052RsIndex.png?dt="+new Date().getTime());
$('.ZXBZpicDay').attr("src","http://hqpick.eastmoney.com/k/3990052.png?dt="+new Date().getTime());
/*创业板指*/
$('.CYBZpicTime').attr("src","http://hqpiczs.dfcfw.com/EM_Quote2010PictureProducter/Picture/3990062RsIndex.png?dt="+new Date().getTime());
$('.CYBZpicDay').attr("src","http://hqpick.eastmoney.com/k/3990062.png?dt="+new Date().getTime());
} function showAjaxDataIF(){
if(!DataIF){return;}
var refreshTime = 10000;
/*IF001Start*/
var IF001Data = DataIF.rank[0].split(",");
var IF001CD = IF001Data[0];
var IF001Name = IF001Data[2];
var IF001Open = IF001Data[4];
var IF001Low = IF001Data[7];
var IF001High = IF001Data[6];
var IF001Now = IF001Data[5];
var IF001YClose = IF001Data[3];
var IF001Class = IF001Now>IF001YClose?"colorRed":(IF001Now<IF001YClose?"colorGreen":"colorGray");
var IF001OClass = IF001Open>IF001YClose?"colorRed":(IF001Open<IF001YClose?"colorGreen":"colorGray");
var IF001LClass = IF001Low>IF001YClose?"colorRed":(IF001Low<IF001YClose?"colorGreen":"colorGray");
var IF001HClass = IF001High>IF001YClose?"colorRed":(IF001High<IF001YClose?"colorGreen":"colorGray");
$('.IF001nowO').html("开盘: <font class='bold "+IF001OClass+"'>"+IF001Open+"</font>");
$('.IF001nowL').html("最低: <font class='bold "+IF001LClass+"'>"+IF001Low+"</font>");
$('.IF001nowH').html("最高: <font class='bold "+IF001HClass+"'>"+IF001High+"</font>");
$('.IF001nowYC').html("昨收: <font class='bold colorGray'>"+IF001YClose+"</font>");
$('.IF001nowN').html("现价: <font class='bold "+IF001Class+"'>"+IF001Now+"</font>");
$('.IF001nowV').html(
"涨跌额: <font class='bold "+IF001Class+"'>"
+Math.round((IF001Now-IF001YClose)*100)/100
+"</font>"
);
$('.IF001nowP').html(
"涨跌幅: <font class='bold "+IF001Class+"'>"
+Math.round(((IF001Now-IF001YClose)/IF001YClose*100)*100)/100
+ " %"+"</font>"
);
$('.IF001Name').html(IF001Name);
/*IF001End*/
/*IF002Start*/
var IF002Data = DataIF.rank[1].split(",");
var IF002CD = IF002Data[0];
var IF002Name = IF002Data[2];
var IF002Open = IF002Data[4];
var IF002Low = IF002Data[7];
var IF002High = IF002Data[6];
var IF002Now = IF002Data[5];
var IF002YClose = IF002Data[3];
var IF002Class = IF002Now>IF002YClose?"colorRed":(IF002Now<IF002YClose?"colorGreen":"colorGray");
var IF002OClass = IF002Open>IF002YClose?"colorRed":(IF002Open<IF002YClose?"colorGreen":"colorGray");
var IF002LClass = IF002Low>IF002YClose?"colorRed":(IF002Low<IF002YClose?"colorGreen":"colorGray");
var IF002HClass = IF002High>IF002YClose?"colorRed":(IF002High<IF002YClose?"colorGreen":"colorGray");
$('.IF002nowO').html("开盘: <font class='bold "+IF002OClass+"'>"+IF002Open+"</font>");
$('.IF002nowL').html("最低: <font class='bold "+IF002LClass+"'>"+IF002Low+"</font>");
$('.IF002nowH').html("最高: <font class='bold "+IF002HClass+"'>"+IF002High+"</font>");
$('.IF002nowYC').html("昨收: <font class='bold colorGray'>"+IF002YClose+"</font>");
$('.IF002nowN').html("现价: <font class='bold "+IF002Class+"'>"+IF002Now+"</font>");
$('.IF002nowV').html(
"涨跌额: <font class='bold "+IF002Class+"'>"
+Math.round((IF002Now-IF002YClose)*100)/100
+"</font>"
);
$('.IF002nowP').html(
"涨跌幅: <font class='bold "+IF002Class+"'>"
+Math.round(((IF002Now-IF002YClose)/IF002YClose*100)*100)/100
+ " %"+"</font>"
);
$('.IF002Name').html(IF002Name);
/*IF002End*/
// img data
/*IF001*/
$('.IF001picTime').attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/"+IF001CD+"RS.png?dt="+new Date().getTime());
$('.IF001picDay').attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/"+IF001CD+"KD.png?dt="+new Date().getTime());
/*IF002*/
$('.IF002picTime').attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/"+IF002CD+"RS.png?dt="+new Date().getTime());
$('.IF002picDay').attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/"+IF002CD+"KD.png?dt="+new Date().getTime()); //setTimeout(loadScript('AjaxDataIF',AjaxDataIFUrl,showAjaxDataIF),refreshTime);
} function showAjaxDataYY(){
if(!DataYY){return;}
var refreshTime = 10000;
/*原油指数Start*/
var YYData = DataYY.futures[0].split(",");
var YYOpen = YYData[4];
var YYLow = YYData[7];
var YYHigh = YYData[6];
var YYNow = YYData[5];
var YYYClose = YYData[3];
var YYClass = YYNow>YYYClose?"colorRed":(YYNow<YYYClose?"colorGreen":"colorGray");
var YYOClass = YYOpen>YYYClose?"colorRed":(YYOpen<YYYClose?"colorGreen":"colorGray");
var YYLClass = YYLow>YYYClose?"colorRed":(YYLow<YYYClose?"colorGreen":"colorGray");
var YYHClass = YYHigh>YYYClose?"colorRed":(YYHigh<YYYClose?"colorGreen":"colorGray");
$('.YYnowO').html("开盘: <font class='bold "+YYOClass+"'>"+YYOpen+"</font>");
$('.YYnowL').html("最低: <font class='bold "+YYLClass+"'>"+YYLow+"</font>");
$('.YYnowH').html("最高: <font class='bold "+YYHClass+"'>"+YYHigh+"</font>");
$('.YYnowYC').html("昨收: <font class='bold colorGray'>"+YYYClose+"</font>");
$('.YYnowN').html("现价: <font class='bold "+YYClass+"'>"+YYNow+"</font>");
$('.YYnowV').html(
"涨跌额: <font class='bold "+YYClass+"'>"
+Math.round((YYNow-YYYClose)*100)/100
+"</font>"
);
$('.YYnowP').html(
"涨跌幅: <font class='bold "+YYClass+"'>"
+Math.round(((YYNow-YYYClose)/YYYClose*100)*100)/100
+ " %"+"</font>"
);
/*原油指数End*/
//setTimeout(loadScript('AjaxDataYY',AjaxDataYYUrl,showAjaxDataYY),refreshTime);
// img data
/*原油指数*/
$('.YYpicTime').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/conc0RS.png?dt="+new Date().getTime());
$('.YYpicDay').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?imagetype=KS&id=CONC0&UnitWidth=7&dt="+new Date().getTime());
} function showAjaxDataGG(){
if(!DataGG){return;}
var refreshTime = 10000;
/*恒生指数Start*/
var HSZSData = DataGG.quotation[0].split(",");
var HSZSOpen = HSZSData[4];
var HSZSLow = HSZSData[7];
var HSZSHigh = HSZSData[6];
var HSZSNow = HSZSData[5];
var HSZSYClose = HSZSData[3];
var HSZSClass = HSZSNow>HSZSYClose?"colorRed":(HSZSNow<HSZSYClose?"colorGreen":"colorGray");
var HSZSOClass = HSZSOpen>HSZSYClose?"colorRed":(HSZSOpen<HSZSYClose?"colorGreen":"colorGray");
var HSZSLClass = HSZSLow>HSZSYClose?"colorRed":(HSZSLow<HSZSYClose?"colorGreen":"colorGray");
var HSZSHClass = HSZSHigh>HSZSYClose?"colorRed":(HSZSHigh<HSZSYClose?"colorGreen":"colorGray");
$('.HSZSnowO').html("开盘: <font class='bold "+HSZSOClass+"'>"+HSZSOpen+"</font>");
$('.HSZSnowL').html("最低: <font class='bold "+HSZSLClass+"'>"+HSZSLow+"</font>");
$('.HSZSnowH').html("最高: <font class='bold "+HSZSHClass+"'>"+HSZSHigh+"</font>");
$('.HSZSnowYC').html("昨收: <font class='bold colorGray'>"+HSZSYClose+"</font>");
$('.HSZSnowN').html("现价: <font class='bold "+HSZSClass+"'>"+HSZSNow+"</font>");
$('.HSZSnowV').html(
"涨跌额: <font class='bold "+HSZSClass+"'>"
+Math.round((HSZSNow-HSZSYClose)*100)/100
+"</font>"
);
$('.HSZSnowP').html(
"涨跌幅: <font class='bold "+HSZSClass+"'>"
+Math.round(((HSZSNow-HSZSYClose)/HSZSYClose*100)*100)/100
+ " %"+"</font>"
);
/*恒生指数End*/
/*国企指数Start*/
var GQZSData = DataGG.quotation[1].split(",");
var GQZSOpen = GQZSData[4];
var GQZSLow = GQZSData[7];
var GQZSHigh = GQZSData[6];
var GQZSNow = GQZSData[5];
var GQZSYClose = GQZSData[3];
var GQZSClass = GQZSNow>GQZSYClose?"colorRed":(GQZSNow<GQZSYClose?"colorGreen":"colorGray");
var GQZSOClass = GQZSOpen>GQZSYClose?"colorRed":(GQZSOpen<GQZSYClose?"colorGreen":"colorGray");
var GQZSLClass = GQZSLow>GQZSYClose?"colorRed":(GQZSLow<GQZSYClose?"colorGreen":"colorGray");
var GQZSHClass = GQZSHigh>GQZSYClose?"colorRed":(GQZSHigh<GQZSYClose?"colorGreen":"colorGray");
$('.GQZSnowO').html("开盘: <font class='bold "+GQZSOClass+"'>"+GQZSOpen+"</font>");
$('.GQZSnowL').html("最低: <font class='bold "+GQZSLClass+"'>"+GQZSLow+"</font>");
$('.GQZSnowH').html("最高: <font class='bold "+GQZSHClass+"'>"+GQZSHigh+"</font>");
$('.GQZSnowYC').html("昨收: <font class='bold colorGray'>"+GQZSYClose+"</font>");
$('.GQZSnowN').html("现价: <font class='bold "+GQZSClass+"'>"+GQZSNow+"</font>");
$('.GQZSnowV').html(
"涨跌额: <font class='bold "+GQZSClass+"'>"
+Math.round((GQZSNow-GQZSYClose)*100)/100
+"</font>"
);
$('.GQZSnowP').html(
"涨跌幅: <font class='bold "+GQZSClass+"'>"
+Math.round(((GQZSNow-GQZSYClose)/GQZSYClose*100)*100)/100
+ " %"+"</font>"
);
/*国企指数End*/
/*红筹指数Start*/
var HCZSData = DataGG.quotation[2].split(",");
var HCZSOpen = HCZSData[4];
var HCZSLow = HCZSData[7];
var HCZSHigh = HCZSData[6];
var HCZSNow = HCZSData[5];
var HCZSYClose = HCZSData[3];
var HCZSClass = HCZSNow>HCZSYClose?"colorRed":(HCZSNow<HCZSYClose?"colorGreen":"colorGray");
var HCZSOClass = HCZSOpen>HCZSYClose?"colorRed":(HCZSOpen<HCZSYClose?"colorGreen":"colorGray");
var HCZSLClass = HCZSLow>HCZSYClose?"colorRed":(HCZSLow<HCZSYClose?"colorGreen":"colorGray");
var HCZSHClass = HCZSHigh>HCZSYClose?"colorRed":(HCZSHigh<HCZSYClose?"colorGreen":"colorGray");
$('.HCZSnowO').html("开盘: <font class='bold "+HCZSOClass+"'>"+HCZSOpen+"</font>");
$('.HCZSnowL').html("最低: <font class='bold "+HCZSLClass+"'>"+HCZSLow+"</font>");
$('.HCZSnowH').html("最高: <font class='bold "+HCZSHClass+"'>"+HCZSHigh+"</font>");
$('.HCZSnowYC').html("昨收: <font class='bold colorGray'>"+HCZSYClose+"</font>");
$('.HCZSnowN').html("现价: <font class='bold "+HCZSClass+"'>"+HCZSNow+"</font>");
$('.HCZSnowV').html(
"涨跌额: <font class='bold "+HCZSClass+"'>"
+Math.round((HCZSNow-HCZSYClose)*100)/100
+"</font>"
);
$('.HCZSnowP').html(
"涨跌幅: <font class='bold "+HCZSClass+"'>"
+Math.round(((HCZSNow-HCZSYClose)/HCZSYClose*100)*100)/100
+ " %"+"</font>"
);
/*红筹指数End*/
//setTimeout(loadScript('AjaxDataGG',AjaxDataGGUrl,showAjaxDataGG),refreshTime); // img data
/*恒生指数*/
$('.HSZSpicTime').attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?ImageType=rsindex&ID=1100005&Reference=rtj&dt="+new Date().getTime());
$('.HSZSpicDay').attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Picture/1100005kd.png?dt="+new Date().getTime());
/*国企指数*/
$('.GQZSpicTime').attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?ImageType=rsindex&ID=1100105&Reference=rtj&dt="+new Date().getTime());
$('.GQZSpicDay').attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Picture/1100105kd.png?dt="+new Date().getTime());
/*红筹指数*/
$('.HCZSpicTime').attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?ImageType=rsindex&ID=1100305&Reference=rtj&dt="+new Date().getTime());
$('.HCZSpicDay').attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Picture/1100305kd.png?dt="+new Date().getTime());
} function showAjaxDataBZ500(){
if(!DataBZ500){return;}
var refreshTime = 10000;
/*标准500Start*/
var BZ500Data = DataBZ500.quotation[0].split(",");
var BZ500Open = BZ500Data[4];
var BZ500Low = BZ500Data[7];
var BZ500High = BZ500Data[6];
var BZ500Now = BZ500Data[5];
var BZ500YClose = BZ500Data[3];
var BZ500Class = BZ500Now>BZ500YClose?"colorRed":(BZ500Now<BZ500YClose?"colorGreen":"colorGray");
var BZ500OClass = BZ500Open>BZ500YClose?"colorRed":(BZ500Open<BZ500YClose?"colorGreen":"colorGray");
var BZ500LClass = BZ500Low>BZ500YClose?"colorRed":(BZ500Low<BZ500YClose?"colorGreen":"colorGray");
var BZ500HClass = BZ500High>BZ500YClose?"colorRed":(BZ500High<BZ500YClose?"colorGreen":"colorGray");
$('.BZ500nowO').html("开盘: <font class='bold "+BZ500OClass+"'>"+BZ500Open+"</font>");
$('.BZ500nowL').html("最低: <font class='bold "+BZ500LClass+"'>"+BZ500Low+"</font>");
$('.BZ500nowH').html("最高: <font class='bold "+BZ500HClass+"'>"+BZ500High+"</font>");
$('.BZ500nowYC').html("昨收: <font class='bold colorGray'>"+BZ500YClose+"</font>");
$('.BZ500nowN').html("现价: <font class='bold "+BZ500Class+"'>"+BZ500Now+"</font>");
$('.BZ500nowV').html(
"涨跌额: <font class='bold "+BZ500Class+"'>"
+Math.round((BZ500Now-BZ500YClose)*100)/100
+"</font>"
);
$('.BZ500nowP').html(
"涨跌幅: <font class='bold "+BZ500Class+"'>"
+Math.round(((BZ500Now-BZ500YClose)/BZ500YClose*100)*100)/100
+ " %"+"</font>"
);
/*标准500End*/
//setTimeout(loadScript('AjaxDataBZ500',AjaxDataBZ500Url,showAjaxDataBZ500),refreshTime);
// img data
/*标准500*/
$('.BZ500picTime').attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Picture/SPX7Rs.png?dt="+new Date().getTime());
$('.BZ500picDay').attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?imagetype=KS&id=SPX7&UnitWidth=&Reference=xml&dt="+new Date().getTime());
} function showAjaxDataNSDK(){
if(!DataNSDK){return;}
var refreshTime = 10000;
/*纳斯达克Start*/
var NSDKData = DataNSDK.quotation[0].split(",");
var NSDKOpen = NSDKData[4];
var NSDKLow = NSDKData[7];
var NSDKHigh = NSDKData[6];
var NSDKNow = NSDKData[5];
var NSDKYClose = NSDKData[3];
var NSDKClass = NSDKNow>NSDKYClose?"colorRed":(NSDKNow<NSDKYClose?"colorGreen":"colorGray");
var NSDKOClass = NSDKOpen>NSDKYClose?"colorRed":(NSDKOpen<NSDKYClose?"colorGreen":"colorGray");
var NSDKLClass = NSDKLow>NSDKYClose?"colorRed":(NSDKLow<NSDKYClose?"colorGreen":"colorGray");
var NSDKHClass = NSDKHigh>NSDKYClose?"colorRed":(NSDKHigh<NSDKYClose?"colorGreen":"colorGray");
$('.NSDKnowO').html("开盘: <font class='bold "+NSDKOClass+"'>"+NSDKOpen+"</font>");
$('.NSDKnowL').html("最低: <font class='bold "+NSDKLClass+"'>"+NSDKLow+"</font>");
$('.NSDKnowH').html("最高: <font class='bold "+NSDKHClass+"'>"+NSDKHigh+"</font>");
$('.NSDKnowYC').html("昨收: <font class='bold colorGray'>"+NSDKYClose+"</font>");
$('.NSDKnowN').html("现价: <font class='bold "+NSDKClass+"'>"+NSDKNow+"</font>");
$('.NSDKnowV').html(
"涨跌额: <font class='bold "+NSDKClass+"'>"
+Math.round((NSDKNow-NSDKYClose)*100)/100
+"</font>"
);
$('.NSDKnowP').html(
"涨跌幅: <font class='bold "+NSDKClass+"'>"
+Math.round(((NSDKNow-NSDKYClose)/NSDKYClose*100)*100)/100
+ " %"+"</font>"
);
/*纳斯达克End*/
//setTimeout(loadScript('AjaxDataNSDK',AjaxDataNSDKUrl,showAjaxDataNSDK),refreshTime);
// img data
/*纳斯达克*/
$('.NSDKpicTime').attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Picture/CCMP7Rs.png?dt="+new Date().getTime());
$('.NSDKpicDay').attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?imagetype=KS&id=CCMP7&UnitWidth=&Reference=xml&dt="+new Date().getTime());
} function showAjaxDataDQS(){
if(!DataDQS){return;}
var refreshTime = 10000;
/*道琼斯Start*/
var DQSData = DataDQS.quotation[0].split(",");
var DQSOpen = DQSData[4];
var DQSLow = DQSData[7];
var DQSHigh = DQSData[6];
var DQSNow = DQSData[5];
var DQSYClose = DQSData[3];
var DQSClass = DQSNow>DQSYClose?"colorRed":(DQSNow<DQSYClose?"colorGreen":"colorGray");
var DQSOClass = DQSOpen>DQSYClose?"colorRed":(DQSOpen<DQSYClose?"colorGreen":"colorGray");
var DQSLClass = DQSLow>DQSYClose?"colorRed":(DQSLow<DQSYClose?"colorGreen":"colorGray");
var DQSHClass = DQSHigh>DQSYClose?"colorRed":(DQSHigh<DQSYClose?"colorGreen":"colorGray");
$('.DQSnowO').html("开盘: <font class='bold "+DQSOClass+"'>"+DQSOpen+"</font>");
$('.DQSnowL').html("最低: <font class='bold "+DQSLClass+"'>"+DQSLow+"</font>");
$('.DQSnowH').html("最高: <font class='bold "+DQSHClass+"'>"+DQSHigh+"</font>");
$('.DQSnowYC').html("昨收: <font class='bold colorGray'>"+DQSYClose+"</font>");
$('.DQSnowN').html("现价: <font class='bold "+DQSClass+"'>"+DQSNow+"</font>");
$('.DQSnowV').html(
"涨跌额: <font class='bold "+DQSClass+"'>"
+Math.round((DQSNow-DQSYClose)*100)/100
+"</font>"
);
$('.DQSnowP').html(
"涨跌幅: <font class='bold "+DQSClass+"'>"
+Math.round(((DQSNow-DQSYClose)/DQSYClose*100)*100)/100
+ " %"+"</font>"
);
/*道琼斯End*/
//setTimeout(loadScript('AjaxDataDQS',AjaxDataDQSUrl,showAjaxDataDQS),refreshTime); // img data
/*道琼斯*/
$('.DQSpicTime').attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Picture/INDU7Rs.png?dt="+new Date().getTime());
$('.DQSpicDay').attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?imagetype=KS&id=INDU7&UnitWidth=&Reference=xml&dt="+new Date().getTime());
} function showAjaxDataWHHL(){
if(!DataWHHL){return;}
var refreshTime = 10000;
/*美中兑换Start*/
var USDCNYData = DataWHHL.futures[0].split(",");
var USDCNYOpen = USDCNYData[4];
var USDCNYLow = USDCNYData[7];
var USDCNYHigh = USDCNYData[6];
var USDCNYNow = USDCNYData[5];
var USDCNYYClose = USDCNYData[3];
var USDCNYClass = USDCNYNow>USDCNYYClose?"colorRed":(USDCNYNow<USDCNYYClose?"colorGreen":"colorGray");
var USDCNYOClass = USDCNYOpen>USDCNYYClose?"colorRed":(USDCNYOpen<USDCNYYClose?"colorGreen":"colorGray");
var USDCNYLClass = USDCNYLow>USDCNYYClose?"colorRed":(USDCNYLow<USDCNYYClose?"colorGreen":"colorGray");
var USDCNYHClass = USDCNYHigh>USDCNYYClose?"colorRed":(USDCNYHigh<USDCNYYClose?"colorGreen":"colorGray");
$('.USDCNYnowO').html("开盘: <font class='bold "+USDCNYOClass+"'>"+USDCNYOpen+"</font>");
$('.USDCNYnowL').html("最低: <font class='bold "+USDCNYLClass+"'>"+USDCNYLow+"</font>");
$('.USDCNYnowH').html("最高: <font class='bold "+USDCNYHClass+"'>"+USDCNYHigh+"</font>");
$('.USDCNYnowYC').html("昨收: <font class='bold colorGray'>"+USDCNYYClose+"</font>");
$('.USDCNYnowN').html("现价: <font class='bold "+USDCNYClass+"'>"+USDCNYNow+"</font>");
$('.USDCNYnowV').html(
"涨跌额: <font class='bold "+USDCNYClass+"'>"
+Math.round((USDCNYNow-USDCNYYClose)*10000)/10000
+"</font>"
);
$('.USDCNYnowP').html(
"涨跌幅: <font class='bold "+USDCNYClass+"'>"
+Math.round(((USDCNYNow-USDCNYYClose)/USDCNYYClose*100)*100)/100
+ " %"+"</font>"
);
/*美中兑换End*/
/*中日兑换Start*/
var CNYJPYData = DataWHHL.futures[1].split(",");
var CNYJPYOpen = CNYJPYData[4];
var CNYJPYLow = CNYJPYData[7];
var CNYJPYHigh = CNYJPYData[6];
var CNYJPYNow = CNYJPYData[5];
var CNYJPYYClose = CNYJPYData[3];
var CNYJPYClass = CNYJPYNow>CNYJPYYClose?"colorRed":(CNYJPYNow<CNYJPYYClose?"colorGreen":"colorGray");
var CNYJPYOClass = CNYJPYOpen>CNYJPYYClose?"colorRed":(CNYJPYOpen<CNYJPYYClose?"colorGreen":"colorGray");
var CNYJPYLClass = CNYJPYLow>CNYJPYYClose?"colorRed":(CNYJPYLow<CNYJPYYClose?"colorGreen":"colorGray");
var CNYJPYHClass = CNYJPYHigh>CNYJPYYClose?"colorRed":(CNYJPYHigh<CNYJPYYClose?"colorGreen":"colorGray");
$('.CNYJPYnowO').html("开盘: <font class='bold "+CNYJPYOClass+"'>"+CNYJPYOpen+"</font>");
$('.CNYJPYnowL').html("最低: <font class='bold "+CNYJPYLClass+"'>"+CNYJPYLow+"</font>");
$('.CNYJPYnowH').html("最高: <font class='bold "+CNYJPYHClass+"'>"+CNYJPYHigh+"</font>");
$('.CNYJPYnowYC').html("昨收: <font class='bold colorGray'>"+CNYJPYYClose+"</font>");
$('.CNYJPYnowN').html("现价: <font class='bold "+CNYJPYClass+"'>"+CNYJPYNow+"</font>");
$('.CNYJPYnowV').html(
"涨跌额: <font class='bold "+CNYJPYClass+"'>"
+Math.round((CNYJPYNow-CNYJPYYClose)*10000)/10000
+"</font>"
);
$('.CNYJPYnowP').html(
"涨跌幅: <font class='bold "+CNYJPYClass+"'>"
+Math.round(((CNYJPYNow-CNYJPYYClose)/CNYJPYYClose*100)*100)/100
+ " %"+"</font>"
);
/*中日兑换End*/
/*日中兑换Start*/
var JPYCNYData = DataWHHL.futures[2].split(",");
var JPYCNYOpen = JPYCNYData[4];
var JPYCNYLow = JPYCNYData[7];
var JPYCNYHigh = JPYCNYData[6];
var JPYCNYNow = JPYCNYData[5];
var JPYCNYYClose = JPYCNYData[3];
var JPYCNYClass = JPYCNYNow>JPYCNYYClose?"colorRed":(JPYCNYNow<JPYCNYYClose?"colorGreen":"colorGray");
var JPYCNYOClass = JPYCNYOpen>JPYCNYYClose?"colorRed":(JPYCNYOpen<JPYCNYYClose?"colorGreen":"colorGray");
var JPYCNYLClass = JPYCNYLow>JPYCNYYClose?"colorRed":(JPYCNYLow<JPYCNYYClose?"colorGreen":"colorGray");
var JPYCNYHClass = JPYCNYHigh>JPYCNYYClose?"colorRed":(JPYCNYHigh<JPYCNYYClose?"colorGreen":"colorGray");
$('.JPYCNYnowO').html("开盘: <font class='bold "+JPYCNYOClass+"'>"+JPYCNYOpen+"</font>");
$('.JPYCNYnowL').html("最低: <font class='bold "+JPYCNYLClass+"'>"+JPYCNYLow+"</font>");
$('.JPYCNYnowH').html("最高: <font class='bold "+JPYCNYHClass+"'>"+JPYCNYHigh+"</font>");
$('.JPYCNYnowYC').html("昨收: <font class='bold colorGray'>"+JPYCNYYClose+"</font>");
$('.JPYCNYnowN').html("现价: <font class='bold "+JPYCNYClass+"'>"+JPYCNYNow+"</font>");
$('.JPYCNYnowV').html(
"涨跌额: <font class='bold "+JPYCNYClass+"'>"
+Math.round((JPYCNYNow-JPYCNYYClose)*10000)/10000
+"</font>"
);
$('.JPYCNYnowP').html(
"涨跌幅: <font class='bold "+JPYCNYClass+"'>"
+Math.round(((JPYCNYNow-JPYCNYYClose)/JPYCNYYClose*100)*100)/100
+ " %"+"</font>"
);
/*日中兑换End*/
/*美欧兑换Start*/
var USDEURData = DataWHHL.futures[3].split(",");
var USDEUROpen = USDEURData[4];
var USDEURLow = USDEURData[7];
var USDEURHigh = USDEURData[6];
var USDEURNow = USDEURData[5];
var USDEURYClose = USDEURData[3];
var USDEURClass = USDEURNow>USDEURYClose?"colorRed":(USDEURNow<USDEURYClose?"colorGreen":"colorGray");
var USDEUROClass = USDEUROpen>USDEURYClose?"colorRed":(USDEUROpen<USDEURYClose?"colorGreen":"colorGray");
var USDEURLClass = USDEURLow>USDEURYClose?"colorRed":(USDEURLow<USDEURYClose?"colorGreen":"colorGray");
var USDEURHClass = USDEURHigh>USDEURYClose?"colorRed":(USDEURHigh<USDEURYClose?"colorGreen":"colorGray");
$('.USDEURnowO').html("开盘: <font class='bold "+USDEUROClass+"'>"+USDEUROpen+"</font>");
$('.USDEURnowL').html("最低: <font class='bold "+USDEURLClass+"'>"+USDEURLow+"</font>");
$('.USDEURnowH').html("最高: <font class='bold "+USDEURHClass+"'>"+USDEURHigh+"</font>");
$('.USDEURnowYC').html("昨收: <font class='bold colorGray'>"+USDEURYClose+"</font>");
$('.USDEURnowN').html("现价: <font class='bold "+USDEURClass+"'>"+USDEURNow+"</font>");
$('.USDEURnowV').html(
"涨跌额: <font class='bold "+USDEURClass+"'>"
+Math.round((USDEURNow-USDEURYClose)*10000)/10000
+"</font>"
);
$('.USDEURnowP').html(
"涨跌幅: <font class='bold "+USDEURClass+"'>"
+Math.round(((USDEURNow-USDEURYClose)/USDEURYClose*100)*100)/100
+ " %"+"</font>"
);
/*美欧兑换End*/
//setTimeout(loadScript('AjaxDataWHHL',AjaxDataWHHLUrl,showAjaxDataWHHL),refreshTime);
// img data
/*汇率兑换*/
$('.USDCNYpicTime').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?imagetype=RS&id=USDCNY0&dt="+new Date().getTime());
$('.USDCNYpicDay').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=KS&ID=USDCNY0&UnitWidth=7&dt="+new Date().getTime());
$('.USDEURpicTime').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?imagetype=RS&id=USDEUR0&dt="+new Date().getTime());
$('.USDEURpicDay').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=KS&ID=USDEUR0&UnitWidth=7&dt="+new Date().getTime());
} function showAjaxDataMYZS(){
if(!DataMYZS){return;}
var refreshTime = 10000;
/*美元指数Start*/
var MYZSData = DataMYZS.futures[0].split(",");
var MYZSOpen = MYZSData[4];
var MYZSLow = MYZSData[7];
var MYZSHigh = MYZSData[6];
var MYZSNow = MYZSData[5];
var MYZSYClose = MYZSData[3];
var MYZSClass = MYZSNow>MYZSYClose?"colorRed":(MYZSNow<MYZSYClose?"colorGreen":"colorGray");
var MYZSOClass = MYZSOpen>MYZSYClose?"colorRed":(MYZSOpen<MYZSYClose?"colorGreen":"colorGray");
var MYZSLClass = MYZSLow>MYZSYClose?"colorRed":(MYZSLow<MYZSYClose?"colorGreen":"colorGray");
var MYZSHClass = MYZSHigh>MYZSYClose?"colorRed":(MYZSHigh<MYZSYClose?"colorGreen":"colorGray");
$('.MYZSnowO').html("开盘: <font class='bold "+MYZSOClass+"'>"+MYZSOpen+"</font>");
$('.MYZSnowL').html("最低: <font class='bold "+MYZSLClass+"'>"+MYZSLow+"</font>");
$('.MYZSnowH').html("最高: <font class='bold "+MYZSHClass+"'>"+MYZSHigh+"</font>");
$('.MYZSnowYC').html("昨收: <font class='bold colorGray'>"+MYZSYClose+"</font>");
$('.MYZSnowN').html("现价: <font class='bold "+MYZSClass+"'>"+MYZSNow+"</font>");
$('.MYZSnowV').html(
"涨跌额: <font class='bold "+MYZSClass+"'>"
+Math.round((MYZSNow-MYZSYClose)*100)/100
+"</font>"
);
$('.MYZSnowP').html(
"涨跌幅: <font class='bold "+MYZSClass+"'>"
+Math.round(((MYZSNow-MYZSYClose)/MYZSYClose*100)*100)/100
+ " %"+"</font>"
);
/*美元指数End*/
//setTimeout(loadScript('AjaxDataMYZS',AjaxDataMYZSUrl,showAjaxDataMYZS),refreshTime);
// img data
/*美元指数*/
$('.MYZSpicTime').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/dini0RS.png?dt="+new Date().getTime());
$('.MYZSpicDay').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=KS&ID=DINI0&UnitWidth=7&dt="+new Date().getTime());
} function showAjaxDataHZLJ(){
if(!DataHZLJ){return;}
var refreshTime = 10000;
/*沪主力金Start*/
var HJZLData = DataHZLJ.futures[0].split(",");
var HJZLOpen = HJZLData[4];
var HJZLLow = HJZLData[7];
var HJZLHigh = HJZLData[6];
var HJZLNow = HJZLData[5];
var HJZLYClose = HJZLData[3];
var HJZLClass = HJZLNow>HJZLYClose?"colorRed":(HJZLNow<HJZLYClose?"colorGreen":"colorGray");
var HJZLOClass = HJZLOpen>HJZLYClose?"colorRed":(HJZLOpen<HJZLYClose?"colorGreen":"colorGray");
var HJZLLClass = HJZLLow>HJZLYClose?"colorRed":(HJZLLow<HJZLYClose?"colorGreen":"colorGray");
var HJZLHClass = HJZLHigh>HJZLYClose?"colorRed":(HJZLHigh<HJZLYClose?"colorGreen":"colorGray");
$('.HJZLnowO').html("开盘: <font class='bold "+HJZLOClass+"'>"+HJZLOpen+"</font>");
$('.HJZLnowL').html("最低: <font class='bold "+HJZLLClass+"'>"+HJZLLow+"</font>");
$('.HJZLnowH').html("最高: <font class='bold "+HJZLHClass+"'>"+HJZLHigh+"</font>");
$('.HJZLnowYC').html("昨收: <font class='bold colorGray'>"+HJZLYClose+"</font>");
$('.HJZLnowN').html("现价: <font class='bold "+HJZLClass+"'>"+HJZLNow+"</font>");
$('.HJZLnowV').html(
"涨跌额: <font class='bold "+HJZLClass+"'>"
+Math.round((HJZLNow-HJZLYClose)*100)/100
+"</font>"
);
$('.HJZLnowP').html(
"涨跌幅: <font class='bold "+HJZLClass+"'>"
+Math.round(((HJZLNow-HJZLYClose)/HJZLYClose*100)*100)/100
+ " %"+"</font>"
);
/*沪主力金End*/
//setTimeout(loadScript('AjaxDataHZLJ',AjaxDataHZLJUrl,showAjaxDataHZLJ),refreshTime); // img data
/*沪主力金*/
$('.HJZLpicTime').attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=RS&ID=AUM1&refrence=rtj&dt="+new Date().getTime());
$('.HJZLpicDay').attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=KS&ID=aum1&UnitWidth=7&dt="+new Date().getTime());
} function showAjaxDataJY(){
if(!DataJY){return;}
var refreshTime = 10000;
/*美黄金Start*/
var MHJData = DataJY.futures[0].split(",");
var MHJOpen = MHJData[4];
var MHJLow = MHJData[7];
var MHJHigh = MHJData[6];
var MHJNow = MHJData[5];
var MHJYClose = MHJData[3];
var MHJClass = MHJNow>MHJYClose?"colorRed":(MHJNow<MHJYClose?"colorGreen":"colorGray");
var MHJOClass = MHJOpen>MHJYClose?"colorRed":(MHJOpen<MHJYClose?"colorGreen":"colorGray");
var MHJLClass = MHJLow>MHJYClose?"colorRed":(MHJLow<MHJYClose?"colorGreen":"colorGray");
var MHJHClass = MHJHigh>MHJYClose?"colorRed":(MHJHigh<MHJYClose?"colorGreen":"colorGray");
$('.MHJnowO').html("开盘: <font class='bold "+MHJOClass+"'>"+MHJOpen+"</font>");
$('.MHJnowL').html("最低: <font class='bold "+MHJLClass+"'>"+MHJLow+"</font>");
$('.MHJnowH').html("最高: <font class='bold "+MHJHClass+"'>"+MHJHigh+"</font>");
$('.MHJnowYC').html("昨收: <font class='bold colorGray'>"+MHJYClose+"</font>");
$('.MHJnowN').html("现价: <font class='bold "+MHJClass+"'>"+MHJNow+"</font>");
$('.MHJnowV').html(
"涨跌额: <font class='bold "+MHJClass+"'>"
+Math.round((MHJNow-MHJYClose)*100)/100
+"</font>"
);
$('.MHJnowP').html(
"涨跌幅: <font class='bold "+MHJClass+"'>"
+Math.round(((MHJNow-MHJYClose)/MHJYClose*100)*100)/100
+ " %"+"</font>"
);
/*美黄金End*/
/*白银指数Start*/
var BYZSData = DataJY.futures[1].split(",");
var BYZSOpen = BYZSData[4];
var BYZSLow = BYZSData[7];
var BYZSHigh = BYZSData[6];
var BYZSNow = BYZSData[5];
var BYZSYClose = BYZSData[3];
var BYZSClass = BYZSNow>BYZSYClose?"colorRed":(BYZSNow<BYZSYClose?"colorGreen":"colorGray");
var BYZSOClass = BYZSOpen>BYZSYClose?"colorRed":(BYZSOpen<BYZSYClose?"colorGreen":"colorGray");
var BYZSLClass = BYZSLow>BYZSYClose?"colorRed":(BYZSLow<BYZSYClose?"colorGreen":"colorGray");
var BYZSHClass = BYZSHigh>BYZSYClose?"colorRed":(BYZSHigh<BYZSYClose?"colorGreen":"colorGray");
$('.BYZSnowO').html("开盘: <font class='bold "+BYZSOClass+"'>"+BYZSOpen+"</font>");
$('.BYZSnowL').html("最低: <font class='bold "+BYZSLClass+"'>"+BYZSLow+"</font>");
$('.BYZSnowH').html("最高: <font class='bold "+BYZSHClass+"'>"+BYZSHigh+"</font>");
$('.BYZSnowYC').html("昨收: <font class='bold colorGray'>"+BYZSYClose+"</font>");
$('.BYZSnowN').html("现价: <font class='bold "+BYZSClass+"'>"+BYZSNow+"</font>");
$('.BYZSnowV').html(
"涨跌额: <font class='bold "+BYZSClass+"'>"
+Math.round((BYZSNow-BYZSYClose)*100)/100
+"</font>"
);
$('.BYZSnowP').html(
"涨跌幅: <font class='bold "+BYZSClass+"'>"
+Math.round(((BYZSNow-BYZSYClose)/BYZSYClose*100)*100)/100
+ " %"+"</font>"
);
/*白银指数End*/
//setTimeout(loadScript('AjaxDataJY',AjaxDataJYUrl,showAjaxDataJY),refreshTime); $('#ntime').html((new Date()).toLocaleTimeString());
// img data
/*黄金*/
$('.MHJpicTime').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/glnc0RS.png?dt="+new Date().getTime());
$('.MHJpicDay').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=KS&ID=glnc0&UnitWidth=7&dt="+new Date().getTime());
/*白银*/
//$('.BYZSpicTime').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?imagetype=R&id=SLNC0&dt="+new Date().getTime());
$('.BYZSpicTime').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/slnc0RS.png?dt="+new Date().getTime());
$('.BYZSpicDay').attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?imagetype=KS&id=SLNC0&UnitWidth=7&dt="+new Date().getTime());
} </script>
</body>
</html>