首页 > 代码库 > [JS]东方财富网财经数据汇总代码示例
[JS]东方财富网财经数据汇总代码示例
把握全球金融状况
一个页面看全球金融,感觉不错
再加上以前做的,读取显示 新浪7*24财经直播数据页面
那看得就更舒服了
下面是 新浪7*24财经直播数据 代码地址:
http://www.cnblogs.com/wangxinsheng/articles/4251228.html
效果图:
展开前
展开后
新浪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页面上的数据。对于现在的情况,就大材小用,还浪费了服务器资源......]
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>财经数据汇总</title> 5 <meta charset=‘UTF-8‘> 6 <script src="http://code.jquery.com/jquery-1.11.2.min.js"></script> 7 <style> 8 body { font-size:12px; margin:0px 0px;} 9 .outDiv {margin:0px 0px;} 10 ul {padding:0px;margin:0px;} 11 ul { list-style:none; /*margin-left:-40px;*/} 12 .bgWhite { background-color:white/*#FBD9F0*/;color:black;} 13 .bgBlue { background-color:#C3F7FF;color:black;} 14 .bgGray { background-color:#F2F2F2;color:black;} 15 .bgBlue2 { background-color:#E2FBFF;color:black;} 16 .bold{ font-weight:bold;} 17 .colorRed {color:red;} 18 .colorGreen {color:green;} 19 .colorGray {color:gray;} 20 .ul,.ul li {line-height:20px; cursor:pointer;} 21 .ul ul {margin-top:0px;margin-bottom:0px;} 22 .floatL {float:left;} 23 .floatR {float:right;} 24 .li_t1_1{width:80px; display:inline; float:left;} 25 .li_d1_1{width:100px; display:inline; float:left;} 26 .li_d1_2{width:90px; display:inline; float:left;} 27 .li_de_t{width:100px; display:inline; float:left;} 28 /*.li_pic{height:100%;}*/ 29 .li_de_pic{display:inline; float:left;} 30 .clear{clear:both;} 31 .smallPic{width:150px; margin-left:10px;} 32 .opp{border-radius:20px 20px 0px 0px;font-size:10px; text-align:center; background-color:gray;color:white;} 33 .opp span{cursor:pointer;} 34 </style> 35 </head> 36 <body> 37 <div class=‘opp‘><span id=‘openAll‘>全部展开</span> <span id=‘closeAll‘>全部折叠</span> <span id=‘doRefresh‘>刷新</span> <span id=‘ntime‘></span></div> 38 <div class=‘outDiv‘> 39 <div class=‘ul bgWhite‘>道琼斯: <span class=‘DQSnowN‘>--.--</span> <span class=‘DQSnowP‘>--.--</span><span style=‘position:absolute;right:10px;‘>美股</span> 40 41 <ul style=‘display:none‘> 42 <!--道琼斯Start--> 43 <li> 44 <div class=‘ul bgGray‘> 45 <div class=‘li_t1_1‘>道琼斯:</div> 46 <div class=‘li_d1_1 DQSnowN‘>--.--</div> 47 <div class=‘li_d1_1 DQSnowV‘>--.--</div> 48 <div class=‘li_d1_1 DQSnowP‘>--.--%</div> 49 <div class=‘clear‘></div> 50 <ul style=‘display:none‘> 51 <li> 52 <div class=‘li_de_t DQSnowO‘>--.--</div> 53 <div class=‘li_de_t DQSnowL‘>--.--</div> 54 <div class=‘li_de_t DQSnowH‘>--.--</div> 55 <div class=‘li_de_t DQSnowYC‘>--.--</div> 56 <div class=‘clear‘></div> 57 </li> 58 <li> 59 <div class=‘li_de_pic‘> 60 <img class=‘smallPic DQSpicTime‘ /> 61 </div> 62 <div class=‘li_de_pic‘> 63 <img class=‘smallPic DQSpicDay‘ /> 64 </div> 65 <div class=‘clear‘></div> 66 </li> 67 </ul> 68 </div> 69 </li> 70 <!--道琼斯End--> 71 <!--纳斯达克Start--> 72 <li> 73 <div class=‘ul bgWhite‘> 74 <div class=‘li_t1_1‘>纳斯达克:</div> 75 <div class=‘li_d1_1 NSDKnowN‘>--.--</div> 76 <div class=‘li_d1_1 NSDKnowV‘>--.--</div> 77 <div class=‘li_d1_1 NSDKnowP‘>--.--%</div> 78 <div class=‘clear‘></div> 79 <ul style=‘display:none‘> 80 <li> 81 <div class=‘li_de_t NSDKnowO‘>--.--</div> 82 <div class=‘li_de_t NSDKnowL‘>--.--</div> 83 <div class=‘li_de_t NSDKnowH‘>--.--</div> 84 <div class=‘li_de_t NSDKnowYC‘>--.--</div> 85 <div class=‘clear‘></div> 86 </li> 87 <li> 88 <div class=‘li_de_pic‘> 89 <img class=‘smallPic NSDKpicTime‘ /> 90 </div> 91 <div class=‘li_de_pic‘> 92 <img class=‘smallPic NSDKpicDay‘ /> 93 </div> 94 <div class=‘clear‘></div> 95 </li> 96 </ul> 97 </div> 98 </li> 99 <!--纳斯达克End--> 100 <!--标准500Start--> 101 <li> 102 <div class=‘ul bgGray‘> 103 <div class=‘li_t1_1‘>标准500:</div> 104 <div class=‘li_d1_1 BZ500nowN‘>--.--</div> 105 <div class=‘li_d1_1 BZ500nowV‘>--.--</div> 106 <div class=‘li_d1_1 BZ500nowP‘>--.--%</div> 107 <div class=‘clear‘></div> 108 <ul style=‘display:none‘> 109 <li> 110 <div class=‘li_de_t BZ500nowO‘>--.--</div> 111 <div class=‘li_de_t BZ500nowL‘>--.--</div> 112 <div class=‘li_de_t BZ500nowH‘>--.--</div> 113 <div class=‘li_de_t BZ500nowYC‘>--.--</div> 114 <div class=‘clear‘></div> 115 </li> 116 <li> 117 <div class=‘li_de_pic‘> 118 <img class=‘smallPic BZ500picTime‘ /> 119 </div> 120 <div class=‘li_de_pic‘> 121 <img class=‘smallPic BZ500picDay‘ /> 122 </div> 123 <div class=‘clear‘></div> 124 </li> 125 </ul> 126 </div> 127 </li> 128 <!--标准500End--> 129 </ul> 130 131 </div> 132 <div class=‘ul bgBlue‘>美黄金: <span class=‘MHJnowN‘>--.--</span> <span class=‘MHJnowP‘>--.--</span><span style=‘position:absolute;right:10px;‘>贵金属</span> 133 134 <ul style=‘display:none‘> 135 <!--美黄金Start--> 136 <li> 137 <div class=‘ul bgBlue2‘> 138 <div class=‘li_t1_1‘>美黄金:</div> 139 <div class=‘li_d1_1 MHJnowN‘>--.--</div> 140 <div class=‘li_d1_1 MHJnowV‘>--.--</div> 141 <div class=‘li_d1_1 MHJnowP‘>--.--%</div> 142 <div class=‘clear‘></div> 143 <ul style=‘display:none‘> 144 <li> 145 <div class=‘li_de_t MHJnowO‘>--.--</div> 146 <div class=‘li_de_t MHJnowL‘>--.--</div> 147 <div class=‘li_de_t MHJnowH‘>--.--</div> 148 <div class=‘li_de_t MHJnowYC‘>--.--</div> 149 <div class=‘clear‘></div> 150 </li> 151 <li> 152 <div class=‘li_de_pic‘> 153 <img class=‘smallPic MHJpicTime‘ /> 154 </div> 155 <div class=‘li_de_pic‘> 156 <img class=‘smallPic MHJpicDay‘ /> 157 </div> 158 <div class=‘clear‘></div> 159 </li> 160 </ul> 161 </div> 162 </li> 163 <!--美黄金End--> 164 <!--白银指数Start--> 165 <li> 166 <div class=‘ul bgBlue‘> 167 <div class=‘li_t1_1‘>白银指数:</div> 168 <div class=‘li_d1_1 BYZSnowN‘>--.--</div> 169 <div class=‘li_d1_1 BYZSnowV‘>--.--</div> 170 <div class=‘li_d1_1 BYZSnowP‘>--.--%</div> 171 <div class=‘clear‘></div> 172 <ul style=‘display:none‘> 173 <li> 174 <div class=‘li_de_t BYZSnowO‘>--.--</div> 175 <div class=‘li_de_t BYZSnowL‘>--.--</div> 176 <div class=‘li_de_t BYZSnowH‘>--.--</div> 177 <div class=‘li_de_t BYZSnowYC‘>--.--</div> 178 <div class=‘clear‘></div> 179 </li> 180 <li> 181 <div class=‘li_de_pic‘> 182 <img class=‘smallPic BYZSpicTime‘ /> 183 </div> 184 <div class=‘li_de_pic‘> 185 <img class=‘smallPic BYZSpicDay‘ /> 186 </div> 187 <div class=‘clear‘></div> 188 </li> 189 </ul> 190 </div> 191 </li> 192 <!--白银指数End--> 193 <!--沪金主力Start--> 194 <li> 195 <div class=‘ul bgBlue2‘> 196 <div class=‘li_t1_1‘>沪金主力:</div> 197 <div class=‘li_d1_1 HJZLnowN‘>--.--</div> 198 <div class=‘li_d1_1 HJZLnowV‘>--.--</div> 199 <div class=‘li_d1_1 HJZLnowP‘>--.--%</div> 200 <div class=‘clear‘></div> 201 <ul style=‘display:none‘> 202 <li> 203 <div class=‘li_de_t HJZLnowO‘>--.--</div> 204 <div class=‘li_de_t HJZLnowL‘>--.--</div> 205 <div class=‘li_de_t HJZLnowH‘>--.--</div> 206 <div class=‘li_de_t HJZLnowYC‘>--.--</div> 207 <div class=‘clear‘></div> 208 </li> 209 <li> 210 <div class=‘li_de_pic‘> 211 <img class=‘smallPic HJZLpicTime‘ /> 212 </div> 213 <div class=‘li_de_pic‘> 214 <img class=‘smallPic HJZLpicDay‘ /> 215 </div> 216 <div class=‘clear‘></div> 217 </li> 218 </ul> 219 </div> 220 </li> 221 <!--沪金主力End--> 222 </ul> 223 </div> 224 <div class=‘ul bgWhite‘>美元指数: <span class=‘MYZSnowN‘>--.--</span> <span class=‘MYZSnowP‘>--.--</span><span style=‘position:absolute;right:10px;‘>外汇</span> 225 <ul style=‘display:none‘> 226 <!--美元指数Start--> 227 <li> 228 <div class=‘ul bgGray‘> 229 <div class=‘li_t1_1‘>美黄指数:</div> 230 <div class=‘li_d1_1 MYZSnowN‘>--.--</div> 231 <div class=‘li_d1_1 MYZSnowV‘>--.--</div> 232 <div class=‘li_d1_1 MYZSnowP‘>--.--%</div> 233 <div class=‘clear‘></div> 234 <ul style=‘display:none‘> 235 <li> 236 <div class=‘li_de_t MYZSnowO‘>--.--</div> 237 <div class=‘li_de_t MYZSnowL‘>--.--</div> 238 <div class=‘li_de_t MYZSnowH‘>--.--</div> 239 <div class=‘li_de_t MYZSnowYC‘>--.--</div> 240 <div class=‘clear‘></div> 241 </li> 242 <li> 243 <div class=‘li_de_pic‘> 244 <img class=‘smallPic MYZSpicTime‘ /> 245 </div> 246 <div class=‘li_de_pic‘> 247 <img class=‘smallPic MYZSpicDay‘ /> 248 </div> 249 <div class=‘clear‘></div> 250 </li> 251 </ul> 252 </div> 253 </li> 254 <!--美元指数End--> 255 <!--美中Start--> 256 <li> 257 <div class=‘ul bgWhite‘> 258 <div class=‘li_t1_1‘>美元人民币:</div> 259 <div class=‘li_d1_1 USDCNYnowN‘>--.--</div> 260 <div class=‘li_d1_1 USDCNYnowV‘>--.--</div> 261 <div class=‘li_d1_1 USDCNYnowP‘>--.--%</div> 262 <div class=‘clear‘></div> 263 <ul style=‘display:none‘> 264 <li> 265 <div class=‘li_de_t USDCNYnowO‘>--.--</div> 266 <div class=‘li_de_t USDCNYnowL‘>--.--</div> 267 <div class=‘li_de_t USDCNYnowH‘>--.--</div> 268 <div class=‘li_de_t USDCNYnowYC‘>--.--</div> 269 <div class=‘clear‘></div> 270 </li> 271 <li> 272 <div class=‘li_de_pic‘> 273 <img class=‘smallPic USDCNYpicTime‘ /> 274 </div> 275 <div class=‘li_de_pic‘> 276 <img class=‘smallPic USDCNYpicDay‘ /> 277 </div> 278 <div class=‘clear‘></div> 279 </li> 280 </ul> 281 </div> 282 </li> 283 <!--美中End--> 284 <!--中日Start--> 285 <li> 286 <div class=‘ul bgGray‘> 287 <div class=‘li_t1_1‘>人民币日元:</div> 288 <div class=‘li_d1_1 CNYJPYnowN‘>--.--</div> 289 <div class=‘li_d1_1 CNYJPYnowV‘>--.--</div> 290 <div class=‘li_d1_1 CNYJPYnowP‘>--.--%</div> 291 <div class=‘clear‘></div> 292 <ul style=‘display:none‘> 293 <li> 294 <div class=‘li_de_t CNYJPYnowO‘>--.--</div> 295 <div class=‘li_de_t CNYJPYnowL‘>--.--</div> 296 <div class=‘li_de_t CNYJPYnowH‘>--.--</div> 297 <div class=‘li_de_t CNYJPYnowYC‘>--.--</div> 298 <div class=‘clear‘></div> 299 </li> 300 </ul> 301 </div> 302 </li> 303 <!--中日End--> 304 <!--日中Start--> 305 <li> 306 <div class=‘ul bgWhite‘> 307 <div class=‘li_t1_1‘>日元人民币:</div> 308 <div class=‘li_d1_1 JPYCNYnowN‘>--.--</div> 309 <div class=‘li_d1_1 JPYCNYnowV‘>--.--</div> 310 <div class=‘li_d1_1 JPYCNYnowP‘>--.--%</div> 311 <div class=‘clear‘></div> 312 <ul style=‘display:none‘> 313 <li> 314 <div class=‘li_de_t JPYCNYnowO‘>--.--</div> 315 <div class=‘li_de_t JPYCNYnowL‘>--.--</div> 316 <div class=‘li_de_t JPYCNYnowH‘>--.--</div> 317 <div class=‘li_de_t JPYCNYnowYC‘>--.--</div> 318 <div class=‘clear‘></div> 319 </li> 320 </ul> 321 </div> 322 </li> 323 <!--日中End--> 324 <!--美欧Start--> 325 <li> 326 <div class=‘ul bgGray‘> 327 <div class=‘li_t1_1‘>美元欧元:</div> 328 <div class=‘li_d1_1 USDEURnowN‘>--.--</div> 329 <div class=‘li_d1_1 USDEURnowV‘>--.--</div> 330 <div class=‘li_d1_1 USDEURnowP‘>--.--%</div> 331 <div class=‘clear‘></div> 332 <ul style=‘display:none‘> 333 <li> 334 <div class=‘li_de_t USDEURnowO‘>--.--</div> 335 <div class=‘li_de_t USDEURnowL‘>--.--</div> 336 <div class=‘li_de_t USDEURnowH‘>--.--</div> 337 <div class=‘li_de_t USDEURnowYC‘>--.--</div> 338 <div class=‘clear‘></div> 339 </li> 340 <li> 341 <div class=‘li_de_pic‘> 342 <img class=‘smallPic USDEURpicTime‘ /> 343 </div> 344 <div class=‘li_de_pic‘> 345 <img class=‘smallPic USDEURpicDay‘ /> 346 </div> 347 <div class=‘clear‘></div> 348 </li> 349 </ul> 350 </div> 351 </li> 352 <!--美欧End--> 353 </ul> 354 </div> 355 <div class=‘ul bgBlue‘>原油指数: <span class=‘YYnowN‘>--.--</span> <span class=‘YYnowP‘>--.--</span><span style=‘position:absolute;right:10px;‘>期货</span> 356 <ul style=‘display:none‘> 357 <!--原油指数Start--> 358 <li> 359 <div class=‘ul bgBlue2‘> 360 <div class=‘li_t1_1‘>原油指数:</div> 361 <div class=‘li_d1_1 YYnowN‘>--.--</div> 362 <div class=‘li_d1_1 YYnowV‘>--.--</div> 363 <div class=‘li_d1_1 YYnowP‘>--.--%</div> 364 <div class=‘clear‘></div> 365 <ul style=‘display:none‘> 366 <li> 367 <div class=‘li_de_t YYnowO‘>--.--</div> 368 <div class=‘li_de_t YYnowL‘>--.--</div> 369 <div class=‘li_de_t YYnowH‘>--.--</div> 370 <div class=‘li_de_t YYnowYC‘>--.--</div> 371 <div class=‘clear‘></div> 372 </li> 373 <li> 374 <div class=‘li_de_pic‘> 375 <img class=‘smallPic YYpicTime‘ /> 376 </div> 377 <div class=‘li_de_pic‘> 378 <img class=‘smallPic YYpicDay‘ /> 379 </div> 380 <div class=‘clear‘></div> 381 </li> 382 </ul> 383 </div> 384 </li> 385 <!--原油指数End--> 386 <!--IF001Start--> 387 <li> 388 <div class=‘ul bgBlue‘> 389 <div class=‘li_t1_1‘><span class=‘IF001Name‘>IF001</span>:</div> 390 <div class=‘li_d1_1 IF001nowN‘>--.--</div> 391 <div class=‘li_d1_1 IF001nowV‘>--.--</div> 392 <div class=‘li_d1_1 IF001nowP‘>--.--%</div> 393 <div class=‘clear‘></div> 394 <ul style=‘display:none‘> 395 <li> 396 <div class=‘li_de_t IF001nowO‘>--.--</div> 397 <div class=‘li_de_t IF001nowL‘>--.--</div> 398 <div class=‘li_de_t IF001nowH‘>--.--</div> 399 <div class=‘li_de_t IF001nowYC‘>--.--</div> 400 <div class=‘clear‘></div> 401 </li> 402 <li> 403 <div class=‘li_de_pic‘> 404 <img class=‘smallPic IF001picTime‘ /> 405 </div> 406 <div class=‘li_de_pic‘> 407 <img class=‘smallPic IF001picDay‘ /> 408 </div> 409 <div class=‘clear‘></div> 410 </li> 411 </ul> 412 </div> 413 </li> 414 <!--IF001End--> 415 <!--IF002Start--> 416 <li> 417 <div class=‘ul bgBlue2‘> 418 <div class=‘li_t1_1‘><span class=‘IF002Name‘>IF002</span>:</div> 419 <div class=‘li_d1_1 IF002nowN‘>--.--</div> 420 <div class=‘li_d1_1 IF002nowV‘>--.--</div> 421 <div class=‘li_d1_1 IF002nowP‘>--.--%</div> 422 <div class=‘clear‘></div> 423 <ul style=‘display:none‘> 424 <li> 425 <div class=‘li_de_t IF002nowO‘>--.--</div> 426 <div class=‘li_de_t IF002nowL‘>--.--</div> 427 <div class=‘li_de_t IF002nowH‘>--.--</div> 428 <div class=‘li_de_t IF002nowYC‘>--.--</div> 429 <div class=‘clear‘></div> 430 </li> 431 <li> 432 <div class=‘li_de_pic‘> 433 <img class=‘smallPic IF002picTime‘ /> 434 </div> 435 <div class=‘li_de_pic‘> 436 <img class=‘smallPic IF002picDay‘ /> 437 </div> 438 <div class=‘clear‘></div> 439 </li> 440 </ul> 441 </div> 442 </li> 443 <!--IF002End--> 444 </ul> 445 </div> 446 <div class=‘ul bgWhite‘>上证综指: <span class=‘SZZSnowN‘>--.--</span> <span class=‘SZZSnowP‘>--.--</span><span style=‘position:absolute;right:10px;‘>A 股</span> 447 <ul style=‘display:none‘> 448 <!--上证指数Start--> 449 <li> 450 <div class=‘ul bgGray‘> 451 <div class=‘li_t1_1‘>上证指数:</div> 452 <div class=‘li_d1_1 SZZSnowN‘>--.--</div> 453 <div class=‘li_d1_1 SZZSnowV‘>--.--</div> 454 <div class=‘li_d1_1 SZZSnowP‘>--.--%</div> 455 <div class=‘clear‘></div> 456 <ul style=‘display:none‘> 457 <li> 458 <div class=‘li_de_t SZZSnowO‘>--.--</div> 459 <div class=‘li_de_t SZZSnowL‘>--.--</div> 460 <div class=‘li_de_t SZZSnowH‘>--.--</div> 461 <div class=‘li_de_t SZZSnowYC‘>--.--</div> 462 <div class=‘clear‘></div> 463 </li> 464 <li> 465 <div class=‘li_de_pic‘> 466 <img class=‘smallPic SZZSpicTime‘ /> 467 </div> 468 <div class=‘li_de_pic‘> 469 <img class=‘smallPic SZZSpicDay‘ /> 470 </div> 471 <div class=‘clear‘></div> 472 </li> 473 </ul> 474 </div> 475 </li> 476 <!--上证指数End--> 477 <!--深证成指Start--> 478 <li> 479 <div class=‘ul bgWhite‘> 480 <div class=‘li_t1_1‘>深证成指:</div> 481 <div class=‘li_d1_1 SZCZnowN‘>--.--</div> 482 <div class=‘li_d1_1 SZCZnowV‘>--.--</div> 483 <div class=‘li_d1_1 SZCZnowP‘>--.--%</div> 484 <div class=‘clear‘></div> 485 <ul style=‘display:none‘> 486 <li> 487 <div class=‘li_de_t SZCZnowO‘>--.--</div> 488 <div class=‘li_de_t SZCZnowL‘>--.--</div> 489 <div class=‘li_de_t SZCZnowH‘>--.--</div> 490 <div class=‘li_de_t SZCZnowYC‘>--.--</div> 491 <div class=‘clear‘></div> 492 </li> 493 <li> 494 <div class=‘li_de_pic‘> 495 <img class=‘smallPic SZCZpicTime‘ /> 496 </div> 497 <div class=‘li_de_pic‘> 498 <img class=‘smallPic SZCZpicDay‘ /> 499 </div> 500 <div class=‘clear‘></div> 501 </li> 502 </ul> 503 </div> 504 </li> 505 <!--深证成指End--> 506 <!--沪深300Start--> 507 <li> 508 <div class=‘ul bgGray‘> 509 <div class=‘li_t1_1‘>沪深300:</div> 510 <div class=‘li_d1_1 HS300nowN‘>--.--</div> 511 <div class=‘li_d1_1 HS300nowV‘>--.--</div> 512 <div class=‘li_d1_1 HS300nowP‘>--.--%</div> 513 <div class=‘clear‘></div> 514 <ul style=‘display:none‘> 515 <li> 516 <div class=‘li_de_t HS300nowO‘>--.--</div> 517 <div class=‘li_de_t HS300nowL‘>--.--</div> 518 <div class=‘li_de_t HS300nowH‘>--.--</div> 519 <div class=‘li_de_t HS300nowYC‘>--.--</div> 520 <div class=‘clear‘></div> 521 </li> 522 <li> 523 <div class=‘li_de_pic‘> 524 <img class=‘smallPic HS300picTime‘ /> 525 </div> 526 <div class=‘li_de_pic‘> 527 <img class=‘smallPic HS300picDay‘ /> 528 </div> 529 <div class=‘clear‘></div> 530 </li> 531 </ul> 532 </div> 533 </li> 534 <!--沪深300End--> 535 <!--中小板指Start--> 536 <li> 537 <div class=‘ul bgWhite‘> 538 <div class=‘li_t1_1‘>中小板指:</div> 539 <div class=‘li_d1_1 ZXBZnowN‘>--.--</div> 540 <div class=‘li_d1_1 ZXBZnowV‘>--.--</div> 541 <div class=‘li_d1_1 ZXBZnowP‘>--.--%</div> 542 <div class=‘clear‘></div> 543 <ul style=‘display:none‘> 544 <li> 545 <div class=‘li_de_t ZXBZnowO‘>--.--</div> 546 <div class=‘li_de_t ZXBZnowL‘>--.--</div> 547 <div class=‘li_de_t ZXBZnowH‘>--.--</div> 548 <div class=‘li_de_t ZXBZnowYC‘>--.--</div> 549 <div class=‘clear‘></div> 550 </li> 551 <li> 552 <div class=‘li_de_pic‘> 553 <img class=‘smallPic ZXBZpicTime‘ /> 554 </div> 555 <div class=‘li_de_pic‘> 556 <img class=‘smallPic ZXBZpicDay‘ /> 557 </div> 558 <div class=‘clear‘></div> 559 </li> 560 </ul> 561 </div> 562 </li> 563 <!--中小板指End--> 564 <!--创业板指Start--> 565 <li> 566 <div class=‘ul bgGray‘> 567 <div class=‘li_t1_1‘>创业板指:</div> 568 <div class=‘li_d1_1 CYBZnowN‘>--.--</div> 569 <div class=‘li_d1_1 CYBZnowV‘>--.--</div> 570 <div class=‘li_d1_1 CYBZnowP‘>--.--%</div> 571 <div class=‘clear‘></div> 572 <ul style=‘display:none‘> 573 <li> 574 <div class=‘li_de_t CYBZnowO‘>--.--</div> 575 <div class=‘li_de_t CYBZnowL‘>--.--</div> 576 <div class=‘li_de_t CYBZnowH‘>--.--</div> 577 <div class=‘li_de_t CYBZnowYC‘>--.--</div> 578 <div class=‘clear‘></div> 579 </li> 580 <li> 581 <div class=‘li_de_pic‘> 582 <img class=‘smallPic CYBZpicTime‘ /> 583 </div> 584 <div class=‘li_de_pic‘> 585 <img class=‘smallPic CYBZpicDay‘ /> 586 </div> 587 <div class=‘clear‘></div> 588 </li> 589 </ul> 590 </div> 591 </li> 592 <!--创业板指End--> 593 </ul> 594 </div> 595 <div class=‘ul bgBlue‘>恒生指数: <span class=‘HSZSnowN‘>--.--</span> <span class=‘HSZSnowP‘>--.--</span><span style=‘position:absolute;right:10px;‘>港股</span> 596 <ul style=‘display:none‘> 597 <!--恒生指数Start--> 598 <li> 599 <div class=‘ul bgBlue2‘> 600 <div class=‘li_t1_1‘>恒生指数:</div> 601 <div class=‘li_d1_1 HSZSnowN‘>--.--</div> 602 <div class=‘li_d1_1 HSZSnowV‘>--.--</div> 603 <div class=‘li_d1_1 HSZSnowP‘>--.--%</div> 604 <div class=‘clear‘></div> 605 <ul style=‘display:none‘> 606 <li> 607 <div class=‘li_de_t HSZSnowO‘>--.--</div> 608 <div class=‘li_de_t HSZSnowL‘>--.--</div> 609 <div class=‘li_de_t HSZSnowH‘>--.--</div> 610 <div class=‘li_de_t HSZSnowYC‘>--.--</div> 611 <div class=‘clear‘></div> 612 </li> 613 <li> 614 <div class=‘li_de_pic‘> 615 <img class=‘smallPic HSZSpicTime‘ /> 616 </div> 617 <div class=‘li_de_pic‘> 618 <img class=‘smallPic HSZSpicDay‘ /> 619 </div> 620 <div class=‘clear‘></div> 621 </li> 622 </ul> 623 </div> 624 </li> 625 <!--恒生指数End--> 626 <!--国企指数Start--> 627 <li> 628 <div class=‘ul bgBlue‘> 629 <div class=‘li_t1_1‘>国企指数:</div> 630 <div class=‘li_d1_1 GQZSnowN‘>--.--</div> 631 <div class=‘li_d1_1 GQZSnowV‘>--.--</div> 632 <div class=‘li_d1_1 GQZSnowP‘>--.--%</div> 633 <div class=‘clear‘></div> 634 <ul style=‘display:none‘> 635 <li> 636 <div class=‘li_de_t GQZSnowO‘>--.--</div> 637 <div class=‘li_de_t GQZSnowL‘>--.--</div> 638 <div class=‘li_de_t GQZSnowH‘>--.--</div> 639 <div class=‘li_de_t GQZSnowYC‘>--.--</div> 640 <div class=‘clear‘></div> 641 </li> 642 <li> 643 <div class=‘li_de_pic‘> 644 <img class=‘smallPic GQZSpicTime‘ /> 645 </div> 646 <div class=‘li_de_pic‘> 647 <img class=‘smallPic GQZSpicDay‘ /> 648 </div> 649 <div class=‘clear‘></div> 650 </li> 651 </ul> 652 </div> 653 </li> 654 <!--国企指数End--> 655 <!--红筹指数Start--> 656 <li> 657 <div class=‘ul bgBlue2‘> 658 <div class=‘li_t1_1‘>红筹指数:</div> 659 <div class=‘li_d1_1 HCZSnowN‘>--.--</div> 660 <div class=‘li_d1_1 HCZSnowV‘>--.--</div> 661 <div class=‘li_d1_1 HCZSnowP‘>--.--%</div> 662 <div class=‘clear‘></div> 663 <ul style=‘display:none‘> 664 <li> 665 <div class=‘li_de_t HCZSnowO‘>--.--</div> 666 <div class=‘li_de_t HCZSnowL‘>--.--</div> 667 <div class=‘li_de_t HCZSnowH‘>--.--</div> 668 <div class=‘li_de_t HCZSnowYC‘>--.--</div> 669 <div class=‘clear‘></div> 670 </li> 671 <li> 672 <div class=‘li_de_pic‘> 673 <img class=‘smallPic HCZSpicTime‘ /> 674 </div> 675 <div class=‘li_de_pic‘> 676 <img class=‘smallPic HCZSpicDay‘ /> 677 </div> 678 <div class=‘clear‘></div> 679 </li> 680 </ul> 681 </div> 682 </li> 683 <!--红筹指数End--> 684 </ul> 685 </div> 686 </div> 687 <script> 688 function getData(){ 689 loadScript(‘AjaxDataAG‘,AjaxDataAGUrl,showAjaxDataAG); 690 loadScript(‘AjaxDataIF‘,AjaxDataIFUrl,showAjaxDataIF); 691 loadScript(‘AjaxDataYY‘,AjaxDataYYUrl,showAjaxDataYY); 692 loadScript(‘AjaxDataGG‘,AjaxDataGGUrl,showAjaxDataGG); 693 loadScript(‘AjaxDataBZ500‘,AjaxDataBZ500Url,showAjaxDataBZ500); 694 loadScript(‘AjaxDataNSDK‘,AjaxDataNSDKUrl,showAjaxDataNSDK); 695 loadScript(‘AjaxDataDQS‘,AjaxDataDQSUrl,showAjaxDataDQS); 696 loadScript(‘AjaxDataWHHL‘,AjaxDataWHHLUrl,showAjaxDataWHHL); 697 loadScript(‘AjaxDataMYZS‘,AjaxDataMYZSUrl,showAjaxDataMYZS); 698 loadScript(‘AjaxDataHZLJ‘,AjaxDataHZLJUrl,showAjaxDataHZLJ); 699 loadScript(‘AjaxDataJY‘,AjaxDataJYUrl,showAjaxDataJY); 700 } 701 $(function(){ 702 getData(); 703 var refreshTime = 10000; 704 setInterval(getData,refreshTime); 705 /*data init over*/ 706 707 $(‘.ul li‘).click(function(e){ 708 e.stopPropagation(); 709 }); 710 711 $(‘.ul‘).click(function(e){ 712 if($(this).find(‘ul‘).length>0 && $(this).find(‘ul‘).eq(0).is(":visible")){ 713 $(this).find(‘ul‘).eq(0).hide(); 714 }else{ 715 $(this).find(‘ul‘).eq(0).show(); 716 } 717 e.stopPropagation(); 718 }); 719 720 $(‘#openAll‘).click(function(e){ 721 $(‘.ul‘).each(function(i){ 722 if($(this).find(‘ul‘).length>0){ 723 $(this).find(‘ul‘).eq(0).show(); 724 } 725 }); 726 }); 727 $(‘#closeAll‘).click(function(e){ 728 $(‘.ul‘).each(function(i){ 729 if($(this).find(‘ul‘).length>0){ 730 $(this).find(‘ul‘).eq(0).hide(); 731 } 732 }); 733 }); 734 $(‘#doRefresh‘).click(function(e){window.location.reload();}); 735 $(‘#ntime‘).html((new Date()).toLocaleTimeString()); 736 }); 737 738 function loadScript(id,url,callBack){ 739 $.getScript(url+"&dt="+new Date().getTime(),callBack); 740 } 741 //美黄金 742 var AjaxDataJYUrl = ‘http://hq2gjqh.eastmoney.com/EM_Futures2010NumericApplication/index.aspx?type=z&jsName=DataJY&Reference=rtj&ids=GLNC0,SLNC0‘; 743 //沪主力金 744 var AjaxDataHZLJUrl = ‘http://hq2gnqh.eastmoney.com/EM_Futures2010NumericApplication/index.aspx?type=z&jsName=DataHZLJ&sortType=A&reference=rtj&sortRule=1&jsSort=1&ids=AUM1‘; 745 //美元指数 746 var AjaxDataMYZSUrl = ‘http://hq2gjqh.eastmoney.com/em_futures2010numericapplication/index.aspx?type=f&jsName=DataMYZS&id=DINI0‘; 747 //汇率 748 var AjaxDataWHHLUrl = ‘http://hq2gjqh.eastmoney.com/EM_Futures2010NumericApplication/Index.aspx?type=z&jsName=DataWHHL&ids=USDCNY0,JPYCNY0,jpcny0,USDEUR0‘; 749 //道琼斯 750 var AjaxDataDQSUrl = ‘http://hq2gjgp.eastmoney.com/EM_Quote2010NumericApplication/Index.aspx?jsName=DataDQS&reference=rtj&type=f&id=INDU7‘; 751 //纳斯达克 752 var AjaxDataNSDKUrl = ‘http://hq2gjgp.eastmoney.com/EM_Quote2010NumericApplication/Index.aspx?jsName=DataNSDK&reference=rtj&type=f&id=CCMP7‘; 753 //标准500 754 var AjaxDataBZ500Url = ‘http://hq2gjgp.eastmoney.com/EM_Quote2010NumericApplication/Index.aspx?jsName=DataBZ500&reference=rtj&type=f&id=SPX7‘; 755 //港股 756 var AjaxDataGGUrl = ‘http://hq2hk.eastmoney.com/EM_Quote2010NumericApplication/Index.aspx?reference=rtj&type=z&jsName=DataGG&ids=1100005,1100105,1100305‘; 757 //原油 758 var AjaxDataYYUrl = ‘http://hq2gjqh.eastmoney.com/em_futures2010numericapplication/index.aspx?type=f&jsName=DataYY&id=CONC0‘; 759 //IF 760 var AjaxDataIFUrl = ‘http://hq2gnqh.eastmoney.com/EM_Futures2010NumericApplication/index.aspx?type=s&jsName=DataIF&style=12&sortType=A&sortRule=1&page=1&pageSize=2‘; 761 //A股 762 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‘; 763 764 function showAjaxDataAG(){ 765 if(!DataAG){return;} 766 var refreshTime = 10000; 767 /*上证指数Start*/ 768 var SZZSData = DataAG.quotation[0].split(","); 769 var SZZSOpen = SZZSData[4]; 770 var SZZSLow = SZZSData[7]; 771 var SZZSHigh = SZZSData[6]; 772 var SZZSNow = SZZSData[5]; 773 var SZZSYClose = SZZSData[3]; 774 var SZZSClass = SZZSNow>SZZSYClose?"colorRed":(SZZSNow<SZZSYClose?"colorGreen":"colorGray"); 775 var SZZSOClass = SZZSOpen>SZZSYClose?"colorRed":(SZZSOpen<SZZSYClose?"colorGreen":"colorGray"); 776 var SZZSLClass = SZZSLow>SZZSYClose?"colorRed":(SZZSLow<SZZSYClose?"colorGreen":"colorGray"); 777 var SZZSHClass = SZZSHigh>SZZSYClose?"colorRed":(SZZSHigh<SZZSYClose?"colorGreen":"colorGray"); 778 $(‘.SZZSnowO‘).html("开盘: <font class=‘bold "+SZZSOClass+"‘>"+SZZSOpen+"</font>"); 779 $(‘.SZZSnowL‘).html("最低: <font class=‘bold "+SZZSLClass+"‘>"+SZZSLow+"</font>"); 780 $(‘.SZZSnowH‘).html("最高: <font class=‘bold "+SZZSHClass+"‘>"+SZZSHigh+"</font>"); 781 $(‘.SZZSnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+SZZSYClose+"</font>"); 782 $(‘.SZZSnowN‘).html("现价: <font class=‘bold "+SZZSClass+"‘>"+SZZSNow+"</font>"); 783 $(‘.SZZSnowV‘).html( 784 "涨跌额: <font class=‘bold "+SZZSClass+"‘>" 785 +Math.round((SZZSNow-SZZSYClose)*100)/100 786 +"</font>" 787 ); 788 $(‘.SZZSnowP‘).html( 789 "涨跌幅: <font class=‘bold "+SZZSClass+"‘>" 790 +Math.round(((SZZSNow-SZZSYClose)/SZZSYClose*100)*100)/100 791 + " %"+"</font>" 792 ); 793 /*上证指数End*/ 794 /*深证成指Start*/ 795 var SZCZData = DataAG.quotation[1].split(","); 796 var SZCZOpen = SZCZData[4]; 797 var SZCZLow = SZCZData[7]; 798 var SZCZHigh = SZCZData[6]; 799 var SZCZNow = SZCZData[5]; 800 var SZCZYClose = SZCZData[3]; 801 var SZCZClass = SZCZNow>SZCZYClose?"colorRed":(SZCZNow<SZCZYClose?"colorGreen":"colorGray"); 802 var SZCZOClass = SZCZOpen>SZCZYClose?"colorRed":(SZCZOpen<SZCZYClose?"colorGreen":"colorGray"); 803 var SZCZLClass = SZCZLow>SZCZYClose?"colorRed":(SZCZLow<SZCZYClose?"colorGreen":"colorGray"); 804 var SZCZHClass = SZCZHigh>SZCZYClose?"colorRed":(SZCZHigh<SZCZYClose?"colorGreen":"colorGray"); 805 $(‘.SZCZnowO‘).html("开盘: <font class=‘bold "+SZCZOClass+"‘>"+SZCZOpen+"</font>"); 806 $(‘.SZCZnowL‘).html("最低: <font class=‘bold "+SZCZLClass+"‘>"+SZCZLow+"</font>"); 807 $(‘.SZCZnowH‘).html("最高: <font class=‘bold "+SZCZHClass+"‘>"+SZCZHigh+"</font>"); 808 $(‘.SZCZnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+SZCZYClose+"</font>"); 809 $(‘.SZCZnowN‘).html("现价: <font class=‘bold "+SZCZClass+"‘>"+SZCZNow+"</font>"); 810 $(‘.SZCZnowV‘).html( 811 "涨跌额: <font class=‘bold "+SZCZClass+"‘>" 812 +Math.round((SZCZNow-SZCZYClose)*100)/100 813 +"</font>" 814 ); 815 $(‘.SZCZnowP‘).html( 816 "涨跌幅: <font class=‘bold "+SZCZClass+"‘>" 817 +Math.round(((SZCZNow-SZCZYClose)/SZCZYClose*100)*100)/100 818 + " %"+"</font>" 819 ); 820 /*深证成指End*/ 821 /*沪深300Start*/ 822 var HS300Data = DataAG.quotation[2].split(","); 823 var HS300Open = HS300Data[4]; 824 var HS300Low = HS300Data[7]; 825 var HS300High = HS300Data[6]; 826 var HS300Now = HS300Data[5]; 827 var HS300YClose = HS300Data[3]; 828 var HS300Class = HS300Now>HS300YClose?"colorRed":(HS300Now<HS300YClose?"colorGreen":"colorGray"); 829 var HS300OClass = HS300Open>HS300YClose?"colorRed":(HS300Open<HS300YClose?"colorGreen":"colorGray"); 830 var HS300LClass = HS300Low>HS300YClose?"colorRed":(HS300Low<HS300YClose?"colorGreen":"colorGray"); 831 var HS300HClass = HS300High>HS300YClose?"colorRed":(HS300High<HS300YClose?"colorGreen":"colorGray"); 832 $(‘.HS300nowO‘).html("开盘: <font class=‘bold "+HS300OClass+"‘>"+HS300Open+"</font>"); 833 $(‘.HS300nowL‘).html("最低: <font class=‘bold "+HS300LClass+"‘>"+HS300Low+"</font>"); 834 $(‘.HS300nowH‘).html("最高: <font class=‘bold "+HS300HClass+"‘>"+HS300High+"</font>"); 835 $(‘.HS300nowYC‘).html("昨收: <font class=‘bold colorGray‘>"+HS300YClose+"</font>"); 836 $(‘.HS300nowN‘).html("现价: <font class=‘bold "+HS300Class+"‘>"+HS300Now+"</font>"); 837 $(‘.HS300nowV‘).html( 838 "涨跌额: <font class=‘bold "+HS300Class+"‘>" 839 +Math.round((HS300Now-HS300YClose)*100)/100 840 +"</font>" 841 ); 842 $(‘.HS300nowP‘).html( 843 "涨跌幅: <font class=‘bold "+HS300Class+"‘>" 844 +Math.round(((HS300Now-HS300YClose)/HS300YClose*100)*100)/100 845 + " %"+"</font>" 846 ); 847 /*沪深300End*/ 848 /*中小板指Start*/ 849 var ZXBZData = DataAG.quotation[3].split(","); 850 var ZXBZOpen = ZXBZData[4]; 851 var ZXBZLow = ZXBZData[7]; 852 var ZXBZHigh = ZXBZData[6]; 853 var ZXBZNow = ZXBZData[5]; 854 var ZXBZYClose = ZXBZData[3]; 855 var ZXBZClass = ZXBZNow>ZXBZYClose?"colorRed":(ZXBZNow<ZXBZYClose?"colorGreen":"colorGray"); 856 var ZXBZOClass = ZXBZOpen>ZXBZYClose?"colorRed":(ZXBZOpen<ZXBZYClose?"colorGreen":"colorGray"); 857 var ZXBZLClass = ZXBZLow>ZXBZYClose?"colorRed":(ZXBZLow<ZXBZYClose?"colorGreen":"colorGray"); 858 var ZXBZHClass = ZXBZHigh>ZXBZYClose?"colorRed":(ZXBZHigh<ZXBZYClose?"colorGreen":"colorGray"); 859 $(‘.ZXBZnowO‘).html("开盘: <font class=‘bold "+ZXBZOClass+"‘>"+ZXBZOpen+"</font>"); 860 $(‘.ZXBZnowL‘).html("最低: <font class=‘bold "+ZXBZLClass+"‘>"+ZXBZLow+"</font>"); 861 $(‘.ZXBZnowH‘).html("最高: <font class=‘bold "+ZXBZHClass+"‘>"+ZXBZHigh+"</font>"); 862 $(‘.ZXBZnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+ZXBZYClose+"</font>"); 863 $(‘.ZXBZnowN‘).html("现价: <font class=‘bold "+ZXBZClass+"‘>"+ZXBZNow+"</font>"); 864 $(‘.ZXBZnowV‘).html( 865 "涨跌额: <font class=‘bold "+ZXBZClass+"‘>" 866 +Math.round((ZXBZNow-ZXBZYClose)*100)/100 867 +"</font>" 868 ); 869 $(‘.ZXBZnowP‘).html( 870 "涨跌幅: <font class=‘bold "+ZXBZClass+"‘>" 871 +Math.round(((ZXBZNow-ZXBZYClose)/ZXBZYClose*100)*100)/100 872 + " %"+"</font>" 873 ); 874 /*中小板指End*/ 875 /*创业板指Start*/ 876 var CYBZData = DataAG.quotation[4].split(","); 877 var CYBZOpen = CYBZData[4]; 878 var CYBZLow = CYBZData[7]; 879 var CYBZHigh = CYBZData[6]; 880 var CYBZNow = CYBZData[5]; 881 var CYBZYClose = CYBZData[3]; 882 var CYBZClass = CYBZNow>CYBZYClose?"colorRed":(CYBZNow<CYBZYClose?"colorGreen":"colorGray"); 883 var CYBZOClass = CYBZOpen>CYBZYClose?"colorRed":(CYBZOpen<CYBZYClose?"colorGreen":"colorGray"); 884 var CYBZLClass = CYBZLow>CYBZYClose?"colorRed":(CYBZLow<CYBZYClose?"colorGreen":"colorGray"); 885 var CYBZHClass = CYBZHigh>CYBZYClose?"colorRed":(CYBZHigh<CYBZYClose?"colorGreen":"colorGray"); 886 $(‘.CYBZnowO‘).html("开盘: <font class=‘bold "+CYBZOClass+"‘>"+CYBZOpen+"</font>"); 887 $(‘.CYBZnowL‘).html("最低: <font class=‘bold "+CYBZLClass+"‘>"+CYBZLow+"</font>"); 888 $(‘.CYBZnowH‘).html("最高: <font class=‘bold "+CYBZHClass+"‘>"+CYBZHigh+"</font>"); 889 $(‘.CYBZnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+CYBZYClose+"</font>"); 890 $(‘.CYBZnowN‘).html("现价: <font class=‘bold "+CYBZClass+"‘>"+CYBZNow+"</font>"); 891 $(‘.CYBZnowV‘).html( 892 "涨跌额: <font class=‘bold "+CYBZClass+"‘>" 893 +Math.round((CYBZNow-CYBZYClose)*100)/100 894 +"</font>" 895 ); 896 $(‘.CYBZnowP‘).html( 897 "涨跌幅: <font class=‘bold "+CYBZClass+"‘>" 898 +Math.round(((CYBZNow-CYBZYClose)/CYBZYClose*100)*100)/100 899 + " %"+"</font>" 900 ); 901 /*创业板指End*/ 902 //setTimeout(loadScript(‘AjaxDataAG‘,AjaxDataAGUrl,showAjaxDataAG),refreshTime); 903 904 // img data 905 /*上证指数*/ 906 $(‘.SZZSpicTime‘).attr("src","http://hqpiczs.dfcfw.com/EM_Quote2010PictureProducter/Picture/0000011RsIndex.png?dt="+new Date().getTime()); 907 $(‘.SZZSpicDay‘).attr("src","http://hqpick.eastmoney.com/k/0000011.png?dt="+new Date().getTime()); 908 /*深证成指*/ 909 $(‘.SZCZpicTime‘).attr("src","http://hqpiczs.dfcfw.com/EM_Quote2010PictureProducter/Picture/3990012RsIndex.png?dt="+new Date().getTime()); 910 $(‘.SZCZpicDay‘).attr("src","http://hqpick.eastmoney.com/k/3990012.png?dt="+new Date().getTime()); 911 /*沪深300指*/ 912 $(‘.HS300picTime‘).attr("src","http://hqpiczs.dfcfw.com/EM_Quote2010PictureProducter/Picture/0003001RsIndex.png?dt="+new Date().getTime()); 913 $(‘.HS300picDay‘).attr("src","http://hqpick.eastmoney.com/k/0003001.png?dt="+new Date().getTime()); 914 /*中小板指*/ 915 $(‘.ZXBZpicTime‘).attr("src","http://hqpiczs.dfcfw.com/EM_Quote2010PictureProducter/Picture/3990052RsIndex.png?dt="+new Date().getTime()); 916 $(‘.ZXBZpicDay‘).attr("src","http://hqpick.eastmoney.com/k/3990052.png?dt="+new Date().getTime()); 917 /*创业板指*/ 918 $(‘.CYBZpicTime‘).attr("src","http://hqpiczs.dfcfw.com/EM_Quote2010PictureProducter/Picture/3990062RsIndex.png?dt="+new Date().getTime()); 919 $(‘.CYBZpicDay‘).attr("src","http://hqpick.eastmoney.com/k/3990062.png?dt="+new Date().getTime()); 920 } 921 922 function showAjaxDataIF(){ 923 if(!DataIF){return;} 924 var refreshTime = 10000; 925 /*IF001Start*/ 926 var IF001Data = DataIF.rank[0].split(","); 927 var IF001CD = IF001Data[0]; 928 var IF001Name = IF001Data[2]; 929 var IF001Open = IF001Data[4]; 930 var IF001Low = IF001Data[7]; 931 var IF001High = IF001Data[6]; 932 var IF001Now = IF001Data[5]; 933 var IF001YClose = IF001Data[3]; 934 var IF001Class = IF001Now>IF001YClose?"colorRed":(IF001Now<IF001YClose?"colorGreen":"colorGray"); 935 var IF001OClass = IF001Open>IF001YClose?"colorRed":(IF001Open<IF001YClose?"colorGreen":"colorGray"); 936 var IF001LClass = IF001Low>IF001YClose?"colorRed":(IF001Low<IF001YClose?"colorGreen":"colorGray"); 937 var IF001HClass = IF001High>IF001YClose?"colorRed":(IF001High<IF001YClose?"colorGreen":"colorGray"); 938 $(‘.IF001nowO‘).html("开盘: <font class=‘bold "+IF001OClass+"‘>"+IF001Open+"</font>"); 939 $(‘.IF001nowL‘).html("最低: <font class=‘bold "+IF001LClass+"‘>"+IF001Low+"</font>"); 940 $(‘.IF001nowH‘).html("最高: <font class=‘bold "+IF001HClass+"‘>"+IF001High+"</font>"); 941 $(‘.IF001nowYC‘).html("昨收: <font class=‘bold colorGray‘>"+IF001YClose+"</font>"); 942 $(‘.IF001nowN‘).html("现价: <font class=‘bold "+IF001Class+"‘>"+IF001Now+"</font>"); 943 $(‘.IF001nowV‘).html( 944 "涨跌额: <font class=‘bold "+IF001Class+"‘>" 945 +Math.round((IF001Now-IF001YClose)*100)/100 946 +"</font>" 947 ); 948 $(‘.IF001nowP‘).html( 949 "涨跌幅: <font class=‘bold "+IF001Class+"‘>" 950 +Math.round(((IF001Now-IF001YClose)/IF001YClose*100)*100)/100 951 + " %"+"</font>" 952 ); 953 $(‘.IF001Name‘).html(IF001Name); 954 /*IF001End*/ 955 /*IF002Start*/ 956 var IF002Data = DataIF.rank[1].split(","); 957 var IF002CD = IF002Data[0]; 958 var IF002Name = IF002Data[2]; 959 var IF002Open = IF002Data[4]; 960 var IF002Low = IF002Data[7]; 961 var IF002High = IF002Data[6]; 962 var IF002Now = IF002Data[5]; 963 var IF002YClose = IF002Data[3]; 964 var IF002Class = IF002Now>IF002YClose?"colorRed":(IF002Now<IF002YClose?"colorGreen":"colorGray"); 965 var IF002OClass = IF002Open>IF002YClose?"colorRed":(IF002Open<IF002YClose?"colorGreen":"colorGray"); 966 var IF002LClass = IF002Low>IF002YClose?"colorRed":(IF002Low<IF002YClose?"colorGreen":"colorGray"); 967 var IF002HClass = IF002High>IF002YClose?"colorRed":(IF002High<IF002YClose?"colorGreen":"colorGray"); 968 $(‘.IF002nowO‘).html("开盘: <font class=‘bold "+IF002OClass+"‘>"+IF002Open+"</font>"); 969 $(‘.IF002nowL‘).html("最低: <font class=‘bold "+IF002LClass+"‘>"+IF002Low+"</font>"); 970 $(‘.IF002nowH‘).html("最高: <font class=‘bold "+IF002HClass+"‘>"+IF002High+"</font>"); 971 $(‘.IF002nowYC‘).html("昨收: <font class=‘bold colorGray‘>"+IF002YClose+"</font>"); 972 $(‘.IF002nowN‘).html("现价: <font class=‘bold "+IF002Class+"‘>"+IF002Now+"</font>"); 973 $(‘.IF002nowV‘).html( 974 "涨跌额: <font class=‘bold "+IF002Class+"‘>" 975 +Math.round((IF002Now-IF002YClose)*100)/100 976 +"</font>" 977 ); 978 $(‘.IF002nowP‘).html( 979 "涨跌幅: <font class=‘bold "+IF002Class+"‘>" 980 +Math.round(((IF002Now-IF002YClose)/IF002YClose*100)*100)/100 981 + " %"+"</font>" 982 ); 983 $(‘.IF002Name‘).html(IF002Name); 984 /*IF002End*/ 985 // img data 986 /*IF001*/ 987 $(‘.IF001picTime‘).attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/"+IF001CD+"RS.png?dt="+new Date().getTime()); 988 $(‘.IF001picDay‘).attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/"+IF001CD+"KD.png?dt="+new Date().getTime()); 989 /*IF002*/ 990 $(‘.IF002picTime‘).attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/"+IF002CD+"RS.png?dt="+new Date().getTime()); 991 $(‘.IF002picDay‘).attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/"+IF002CD+"KD.png?dt="+new Date().getTime()); 992 993 //setTimeout(loadScript(‘AjaxDataIF‘,AjaxDataIFUrl,showAjaxDataIF),refreshTime); 994 } 995 996 function showAjaxDataYY(){ 997 if(!DataYY){return;} 998 var refreshTime = 10000; 999 /*原油指数Start*/1000 var YYData = DataYY.futures[0].split(",");1001 var YYOpen = YYData[4];1002 var YYLow = YYData[7];1003 var YYHigh = YYData[6];1004 var YYNow = YYData[5];1005 var YYYClose = YYData[3];1006 var YYClass = YYNow>YYYClose?"colorRed":(YYNow<YYYClose?"colorGreen":"colorGray");1007 var YYOClass = YYOpen>YYYClose?"colorRed":(YYOpen<YYYClose?"colorGreen":"colorGray");1008 var YYLClass = YYLow>YYYClose?"colorRed":(YYLow<YYYClose?"colorGreen":"colorGray");1009 var YYHClass = YYHigh>YYYClose?"colorRed":(YYHigh<YYYClose?"colorGreen":"colorGray");1010 $(‘.YYnowO‘).html("开盘: <font class=‘bold "+YYOClass+"‘>"+YYOpen+"</font>");1011 $(‘.YYnowL‘).html("最低: <font class=‘bold "+YYLClass+"‘>"+YYLow+"</font>");1012 $(‘.YYnowH‘).html("最高: <font class=‘bold "+YYHClass+"‘>"+YYHigh+"</font>");1013 $(‘.YYnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+YYYClose+"</font>");1014 $(‘.YYnowN‘).html("现价: <font class=‘bold "+YYClass+"‘>"+YYNow+"</font>");1015 $(‘.YYnowV‘).html(1016 "涨跌额: <font class=‘bold "+YYClass+"‘>"1017 +Math.round((YYNow-YYYClose)*100)/1001018 +"</font>"1019 );1020 $(‘.YYnowP‘).html(1021 "涨跌幅: <font class=‘bold "+YYClass+"‘>"1022 +Math.round(((YYNow-YYYClose)/YYYClose*100)*100)/1001023 + " %"+"</font>"1024 );1025 /*原油指数End*/1026 //setTimeout(loadScript(‘AjaxDataYY‘,AjaxDataYYUrl,showAjaxDataYY),refreshTime);1027 // img data1028 /*原油指数*/1029 $(‘.YYpicTime‘).attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/conc0RS.png?dt="+new Date().getTime());1030 $(‘.YYpicDay‘).attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?imagetype=KS&id=CONC0&UnitWidth=7&dt="+new Date().getTime());1031 }1032 1033 1034 function showAjaxDataGG(){1035 if(!DataGG){return;}1036 var refreshTime = 10000;1037 /*恒生指数Start*/1038 var HSZSData = DataGG.quotation[0].split(",");1039 var HSZSOpen = HSZSData[4];1040 var HSZSLow = HSZSData[7];1041 var HSZSHigh = HSZSData[6];1042 var HSZSNow = HSZSData[5];1043 var HSZSYClose = HSZSData[3];1044 var HSZSClass = HSZSNow>HSZSYClose?"colorRed":(HSZSNow<HSZSYClose?"colorGreen":"colorGray");1045 var HSZSOClass = HSZSOpen>HSZSYClose?"colorRed":(HSZSOpen<HSZSYClose?"colorGreen":"colorGray");1046 var HSZSLClass = HSZSLow>HSZSYClose?"colorRed":(HSZSLow<HSZSYClose?"colorGreen":"colorGray");1047 var HSZSHClass = HSZSHigh>HSZSYClose?"colorRed":(HSZSHigh<HSZSYClose?"colorGreen":"colorGray");1048 $(‘.HSZSnowO‘).html("开盘: <font class=‘bold "+HSZSOClass+"‘>"+HSZSOpen+"</font>");1049 $(‘.HSZSnowL‘).html("最低: <font class=‘bold "+HSZSLClass+"‘>"+HSZSLow+"</font>");1050 $(‘.HSZSnowH‘).html("最高: <font class=‘bold "+HSZSHClass+"‘>"+HSZSHigh+"</font>");1051 $(‘.HSZSnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+HSZSYClose+"</font>");1052 $(‘.HSZSnowN‘).html("现价: <font class=‘bold "+HSZSClass+"‘>"+HSZSNow+"</font>");1053 $(‘.HSZSnowV‘).html(1054 "涨跌额: <font class=‘bold "+HSZSClass+"‘>"1055 +Math.round((HSZSNow-HSZSYClose)*100)/1001056 +"</font>"1057 );1058 $(‘.HSZSnowP‘).html(1059 "涨跌幅: <font class=‘bold "+HSZSClass+"‘>"1060 +Math.round(((HSZSNow-HSZSYClose)/HSZSYClose*100)*100)/1001061 + " %"+"</font>"1062 );1063 /*恒生指数End*/1064 /*国企指数Start*/1065 var GQZSData = DataGG.quotation[1].split(",");1066 var GQZSOpen = GQZSData[4];1067 var GQZSLow = GQZSData[7];1068 var GQZSHigh = GQZSData[6];1069 var GQZSNow = GQZSData[5];1070 var GQZSYClose = GQZSData[3];1071 var GQZSClass = GQZSNow>GQZSYClose?"colorRed":(GQZSNow<GQZSYClose?"colorGreen":"colorGray");1072 var GQZSOClass = GQZSOpen>GQZSYClose?"colorRed":(GQZSOpen<GQZSYClose?"colorGreen":"colorGray");1073 var GQZSLClass = GQZSLow>GQZSYClose?"colorRed":(GQZSLow<GQZSYClose?"colorGreen":"colorGray");1074 var GQZSHClass = GQZSHigh>GQZSYClose?"colorRed":(GQZSHigh<GQZSYClose?"colorGreen":"colorGray");1075 $(‘.GQZSnowO‘).html("开盘: <font class=‘bold "+GQZSOClass+"‘>"+GQZSOpen+"</font>");1076 $(‘.GQZSnowL‘).html("最低: <font class=‘bold "+GQZSLClass+"‘>"+GQZSLow+"</font>");1077 $(‘.GQZSnowH‘).html("最高: <font class=‘bold "+GQZSHClass+"‘>"+GQZSHigh+"</font>");1078 $(‘.GQZSnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+GQZSYClose+"</font>");1079 $(‘.GQZSnowN‘).html("现价: <font class=‘bold "+GQZSClass+"‘>"+GQZSNow+"</font>");1080 $(‘.GQZSnowV‘).html(1081 "涨跌额: <font class=‘bold "+GQZSClass+"‘>"1082 +Math.round((GQZSNow-GQZSYClose)*100)/1001083 +"</font>"1084 );1085 $(‘.GQZSnowP‘).html(1086 "涨跌幅: <font class=‘bold "+GQZSClass+"‘>"1087 +Math.round(((GQZSNow-GQZSYClose)/GQZSYClose*100)*100)/1001088 + " %"+"</font>"1089 );1090 /*国企指数End*/1091 /*红筹指数Start*/1092 var HCZSData = DataGG.quotation[2].split(",");1093 var HCZSOpen = HCZSData[4];1094 var HCZSLow = HCZSData[7];1095 var HCZSHigh = HCZSData[6];1096 var HCZSNow = HCZSData[5];1097 var HCZSYClose = HCZSData[3];1098 var HCZSClass = HCZSNow>HCZSYClose?"colorRed":(HCZSNow<HCZSYClose?"colorGreen":"colorGray");1099 var HCZSOClass = HCZSOpen>HCZSYClose?"colorRed":(HCZSOpen<HCZSYClose?"colorGreen":"colorGray");1100 var HCZSLClass = HCZSLow>HCZSYClose?"colorRed":(HCZSLow<HCZSYClose?"colorGreen":"colorGray");1101 var HCZSHClass = HCZSHigh>HCZSYClose?"colorRed":(HCZSHigh<HCZSYClose?"colorGreen":"colorGray");1102 $(‘.HCZSnowO‘).html("开盘: <font class=‘bold "+HCZSOClass+"‘>"+HCZSOpen+"</font>");1103 $(‘.HCZSnowL‘).html("最低: <font class=‘bold "+HCZSLClass+"‘>"+HCZSLow+"</font>");1104 $(‘.HCZSnowH‘).html("最高: <font class=‘bold "+HCZSHClass+"‘>"+HCZSHigh+"</font>");1105 $(‘.HCZSnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+HCZSYClose+"</font>");1106 $(‘.HCZSnowN‘).html("现价: <font class=‘bold "+HCZSClass+"‘>"+HCZSNow+"</font>");1107 $(‘.HCZSnowV‘).html(1108 "涨跌额: <font class=‘bold "+HCZSClass+"‘>"1109 +Math.round((HCZSNow-HCZSYClose)*100)/1001110 +"</font>"1111 );1112 $(‘.HCZSnowP‘).html(1113 "涨跌幅: <font class=‘bold "+HCZSClass+"‘>"1114 +Math.round(((HCZSNow-HCZSYClose)/HCZSYClose*100)*100)/1001115 + " %"+"</font>"1116 );1117 /*红筹指数End*/1118 //setTimeout(loadScript(‘AjaxDataGG‘,AjaxDataGGUrl,showAjaxDataGG),refreshTime);1119 1120 // img data1121 /*恒生指数*/1122 $(‘.HSZSpicTime‘).attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?ImageType=rsindex&ID=1100005&Reference=rtj&dt="+new Date().getTime());1123 $(‘.HSZSpicDay‘).attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Picture/1100005kd.png?dt="+new Date().getTime());1124 /*国企指数*/1125 $(‘.GQZSpicTime‘).attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?ImageType=rsindex&ID=1100105&Reference=rtj&dt="+new Date().getTime());1126 $(‘.GQZSpicDay‘).attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Picture/1100105kd.png?dt="+new Date().getTime());1127 /*红筹指数*/1128 $(‘.HCZSpicTime‘).attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?ImageType=rsindex&ID=1100305&Reference=rtj&dt="+new Date().getTime());1129 $(‘.HCZSpicDay‘).attr("src","http://hqhkpic.eastmoney.com/EM_Quote2010PictureProducter/Picture/1100305kd.png?dt="+new Date().getTime());1130 }1131 1132 function showAjaxDataBZ500(){1133 if(!DataBZ500){return;}1134 var refreshTime = 10000;1135 /*标准500Start*/1136 var BZ500Data = DataBZ500.quotation[0].split(",");1137 var BZ500Open = BZ500Data[4];1138 var BZ500Low = BZ500Data[7];1139 var BZ500High = BZ500Data[6];1140 var BZ500Now = BZ500Data[5];1141 var BZ500YClose = BZ500Data[3];1142 var BZ500Class = BZ500Now>BZ500YClose?"colorRed":(BZ500Now<BZ500YClose?"colorGreen":"colorGray");1143 var BZ500OClass = BZ500Open>BZ500YClose?"colorRed":(BZ500Open<BZ500YClose?"colorGreen":"colorGray");1144 var BZ500LClass = BZ500Low>BZ500YClose?"colorRed":(BZ500Low<BZ500YClose?"colorGreen":"colorGray");1145 var BZ500HClass = BZ500High>BZ500YClose?"colorRed":(BZ500High<BZ500YClose?"colorGreen":"colorGray");1146 $(‘.BZ500nowO‘).html("开盘: <font class=‘bold "+BZ500OClass+"‘>"+BZ500Open+"</font>");1147 $(‘.BZ500nowL‘).html("最低: <font class=‘bold "+BZ500LClass+"‘>"+BZ500Low+"</font>");1148 $(‘.BZ500nowH‘).html("最高: <font class=‘bold "+BZ500HClass+"‘>"+BZ500High+"</font>");1149 $(‘.BZ500nowYC‘).html("昨收: <font class=‘bold colorGray‘>"+BZ500YClose+"</font>");1150 $(‘.BZ500nowN‘).html("现价: <font class=‘bold "+BZ500Class+"‘>"+BZ500Now+"</font>");1151 $(‘.BZ500nowV‘).html(1152 "涨跌额: <font class=‘bold "+BZ500Class+"‘>"1153 +Math.round((BZ500Now-BZ500YClose)*100)/1001154 +"</font>"1155 );1156 $(‘.BZ500nowP‘).html(1157 "涨跌幅: <font class=‘bold "+BZ500Class+"‘>"1158 +Math.round(((BZ500Now-BZ500YClose)/BZ500YClose*100)*100)/1001159 + " %"+"</font>"1160 );1161 /*标准500End*/1162 //setTimeout(loadScript(‘AjaxDataBZ500‘,AjaxDataBZ500Url,showAjaxDataBZ500),refreshTime);1163 // img data1164 /*标准500*/1165 $(‘.BZ500picTime‘).attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Picture/SPX7Rs.png?dt="+new Date().getTime());1166 $(‘.BZ500picDay‘).attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?imagetype=KS&id=SPX7&UnitWidth=&Reference=xml&dt="+new Date().getTime());1167 }1168 1169 1170 function showAjaxDataNSDK(){1171 if(!DataNSDK){return;}1172 var refreshTime = 10000;1173 /*纳斯达克Start*/1174 var NSDKData = DataNSDK.quotation[0].split(",");1175 var NSDKOpen = NSDKData[4];1176 var NSDKLow = NSDKData[7];1177 var NSDKHigh = NSDKData[6];1178 var NSDKNow = NSDKData[5];1179 var NSDKYClose = NSDKData[3];1180 var NSDKClass = NSDKNow>NSDKYClose?"colorRed":(NSDKNow<NSDKYClose?"colorGreen":"colorGray");1181 var NSDKOClass = NSDKOpen>NSDKYClose?"colorRed":(NSDKOpen<NSDKYClose?"colorGreen":"colorGray");1182 var NSDKLClass = NSDKLow>NSDKYClose?"colorRed":(NSDKLow<NSDKYClose?"colorGreen":"colorGray");1183 var NSDKHClass = NSDKHigh>NSDKYClose?"colorRed":(NSDKHigh<NSDKYClose?"colorGreen":"colorGray");1184 $(‘.NSDKnowO‘).html("开盘: <font class=‘bold "+NSDKOClass+"‘>"+NSDKOpen+"</font>");1185 $(‘.NSDKnowL‘).html("最低: <font class=‘bold "+NSDKLClass+"‘>"+NSDKLow+"</font>");1186 $(‘.NSDKnowH‘).html("最高: <font class=‘bold "+NSDKHClass+"‘>"+NSDKHigh+"</font>");1187 $(‘.NSDKnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+NSDKYClose+"</font>");1188 $(‘.NSDKnowN‘).html("现价: <font class=‘bold "+NSDKClass+"‘>"+NSDKNow+"</font>");1189 $(‘.NSDKnowV‘).html(1190 "涨跌额: <font class=‘bold "+NSDKClass+"‘>"1191 +Math.round((NSDKNow-NSDKYClose)*100)/1001192 +"</font>"1193 );1194 $(‘.NSDKnowP‘).html(1195 "涨跌幅: <font class=‘bold "+NSDKClass+"‘>"1196 +Math.round(((NSDKNow-NSDKYClose)/NSDKYClose*100)*100)/1001197 + " %"+"</font>"1198 );1199 /*纳斯达克End*/1200 //setTimeout(loadScript(‘AjaxDataNSDK‘,AjaxDataNSDKUrl,showAjaxDataNSDK),refreshTime);1201 // img data1202 /*纳斯达克*/1203 $(‘.NSDKpicTime‘).attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Picture/CCMP7Rs.png?dt="+new Date().getTime());1204 $(‘.NSDKpicDay‘).attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?imagetype=KS&id=CCMP7&UnitWidth=&Reference=xml&dt="+new Date().getTime());1205 }1206 1207 1208 function showAjaxDataDQS(){1209 if(!DataDQS){return;}1210 var refreshTime = 10000;1211 /*道琼斯Start*/1212 var DQSData = DataDQS.quotation[0].split(",");1213 var DQSOpen = DQSData[4];1214 var DQSLow = DQSData[7];1215 var DQSHigh = DQSData[6];1216 var DQSNow = DQSData[5];1217 var DQSYClose = DQSData[3];1218 var DQSClass = DQSNow>DQSYClose?"colorRed":(DQSNow<DQSYClose?"colorGreen":"colorGray");1219 var DQSOClass = DQSOpen>DQSYClose?"colorRed":(DQSOpen<DQSYClose?"colorGreen":"colorGray");1220 var DQSLClass = DQSLow>DQSYClose?"colorRed":(DQSLow<DQSYClose?"colorGreen":"colorGray");1221 var DQSHClass = DQSHigh>DQSYClose?"colorRed":(DQSHigh<DQSYClose?"colorGreen":"colorGray");1222 $(‘.DQSnowO‘).html("开盘: <font class=‘bold "+DQSOClass+"‘>"+DQSOpen+"</font>");1223 $(‘.DQSnowL‘).html("最低: <font class=‘bold "+DQSLClass+"‘>"+DQSLow+"</font>");1224 $(‘.DQSnowH‘).html("最高: <font class=‘bold "+DQSHClass+"‘>"+DQSHigh+"</font>");1225 $(‘.DQSnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+DQSYClose+"</font>");1226 $(‘.DQSnowN‘).html("现价: <font class=‘bold "+DQSClass+"‘>"+DQSNow+"</font>");1227 $(‘.DQSnowV‘).html(1228 "涨跌额: <font class=‘bold "+DQSClass+"‘>"1229 +Math.round((DQSNow-DQSYClose)*100)/1001230 +"</font>"1231 );1232 $(‘.DQSnowP‘).html(1233 "涨跌幅: <font class=‘bold "+DQSClass+"‘>"1234 +Math.round(((DQSNow-DQSYClose)/DQSYClose*100)*100)/1001235 + " %"+"</font>"1236 );1237 /*道琼斯End*/1238 //setTimeout(loadScript(‘AjaxDataDQS‘,AjaxDataDQSUrl,showAjaxDataDQS),refreshTime);1239 1240 // img data1241 /*道琼斯*/1242 $(‘.DQSpicTime‘).attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Picture/INDU7Rs.png?dt="+new Date().getTime());1243 $(‘.DQSpicDay‘).attr("src","http://hqgjgppic.eastmoney.com/EM_Quote2010PictureProducter/Index.aspx?imagetype=KS&id=INDU7&UnitWidth=&Reference=xml&dt="+new Date().getTime()); 1244 }1245 1246 function showAjaxDataWHHL(){1247 if(!DataWHHL){return;}1248 var refreshTime = 10000;1249 /*美中兑换Start*/1250 var USDCNYData = DataWHHL.futures[0].split(",");1251 var USDCNYOpen = USDCNYData[4];1252 var USDCNYLow = USDCNYData[7];1253 var USDCNYHigh = USDCNYData[6];1254 var USDCNYNow = USDCNYData[5];1255 var USDCNYYClose = USDCNYData[3];1256 var USDCNYClass = USDCNYNow>USDCNYYClose?"colorRed":(USDCNYNow<USDCNYYClose?"colorGreen":"colorGray");1257 var USDCNYOClass = USDCNYOpen>USDCNYYClose?"colorRed":(USDCNYOpen<USDCNYYClose?"colorGreen":"colorGray");1258 var USDCNYLClass = USDCNYLow>USDCNYYClose?"colorRed":(USDCNYLow<USDCNYYClose?"colorGreen":"colorGray");1259 var USDCNYHClass = USDCNYHigh>USDCNYYClose?"colorRed":(USDCNYHigh<USDCNYYClose?"colorGreen":"colorGray");1260 $(‘.USDCNYnowO‘).html("开盘: <font class=‘bold "+USDCNYOClass+"‘>"+USDCNYOpen+"</font>");1261 $(‘.USDCNYnowL‘).html("最低: <font class=‘bold "+USDCNYLClass+"‘>"+USDCNYLow+"</font>");1262 $(‘.USDCNYnowH‘).html("最高: <font class=‘bold "+USDCNYHClass+"‘>"+USDCNYHigh+"</font>");1263 $(‘.USDCNYnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+USDCNYYClose+"</font>");1264 $(‘.USDCNYnowN‘).html("现价: <font class=‘bold "+USDCNYClass+"‘>"+USDCNYNow+"</font>");1265 $(‘.USDCNYnowV‘).html(1266 "涨跌额: <font class=‘bold "+USDCNYClass+"‘>"1267 +Math.round((USDCNYNow-USDCNYYClose)*10000)/100001268 +"</font>"1269 );1270 $(‘.USDCNYnowP‘).html(1271 "涨跌幅: <font class=‘bold "+USDCNYClass+"‘>"1272 +Math.round(((USDCNYNow-USDCNYYClose)/USDCNYYClose*100)*100)/1001273 + " %"+"</font>"1274 );1275 /*美中兑换End*/ 1276 /*中日兑换Start*/1277 var CNYJPYData = DataWHHL.futures[1].split(",");1278 var CNYJPYOpen = CNYJPYData[4];1279 var CNYJPYLow = CNYJPYData[7];1280 var CNYJPYHigh = CNYJPYData[6];1281 var CNYJPYNow = CNYJPYData[5];1282 var CNYJPYYClose = CNYJPYData[3];1283 var CNYJPYClass = CNYJPYNow>CNYJPYYClose?"colorRed":(CNYJPYNow<CNYJPYYClose?"colorGreen":"colorGray");1284 var CNYJPYOClass = CNYJPYOpen>CNYJPYYClose?"colorRed":(CNYJPYOpen<CNYJPYYClose?"colorGreen":"colorGray");1285 var CNYJPYLClass = CNYJPYLow>CNYJPYYClose?"colorRed":(CNYJPYLow<CNYJPYYClose?"colorGreen":"colorGray");1286 var CNYJPYHClass = CNYJPYHigh>CNYJPYYClose?"colorRed":(CNYJPYHigh<CNYJPYYClose?"colorGreen":"colorGray");1287 $(‘.CNYJPYnowO‘).html("开盘: <font class=‘bold "+CNYJPYOClass+"‘>"+CNYJPYOpen+"</font>");1288 $(‘.CNYJPYnowL‘).html("最低: <font class=‘bold "+CNYJPYLClass+"‘>"+CNYJPYLow+"</font>");1289 $(‘.CNYJPYnowH‘).html("最高: <font class=‘bold "+CNYJPYHClass+"‘>"+CNYJPYHigh+"</font>");1290 $(‘.CNYJPYnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+CNYJPYYClose+"</font>");1291 $(‘.CNYJPYnowN‘).html("现价: <font class=‘bold "+CNYJPYClass+"‘>"+CNYJPYNow+"</font>");1292 $(‘.CNYJPYnowV‘).html(1293 "涨跌额: <font class=‘bold "+CNYJPYClass+"‘>"1294 +Math.round((CNYJPYNow-CNYJPYYClose)*10000)/100001295 +"</font>"1296 );1297 $(‘.CNYJPYnowP‘).html(1298 "涨跌幅: <font class=‘bold "+CNYJPYClass+"‘>"1299 +Math.round(((CNYJPYNow-CNYJPYYClose)/CNYJPYYClose*100)*100)/1001300 + " %"+"</font>"1301 );1302 /*中日兑换End*/1303 /*日中兑换Start*/1304 var JPYCNYData = DataWHHL.futures[2].split(",");1305 var JPYCNYOpen = JPYCNYData[4];1306 var JPYCNYLow = JPYCNYData[7];1307 var JPYCNYHigh = JPYCNYData[6];1308 var JPYCNYNow = JPYCNYData[5];1309 var JPYCNYYClose = JPYCNYData[3];1310 var JPYCNYClass = JPYCNYNow>JPYCNYYClose?"colorRed":(JPYCNYNow<JPYCNYYClose?"colorGreen":"colorGray");1311 var JPYCNYOClass = JPYCNYOpen>JPYCNYYClose?"colorRed":(JPYCNYOpen<JPYCNYYClose?"colorGreen":"colorGray");1312 var JPYCNYLClass = JPYCNYLow>JPYCNYYClose?"colorRed":(JPYCNYLow<JPYCNYYClose?"colorGreen":"colorGray");1313 var JPYCNYHClass = JPYCNYHigh>JPYCNYYClose?"colorRed":(JPYCNYHigh<JPYCNYYClose?"colorGreen":"colorGray");1314 $(‘.JPYCNYnowO‘).html("开盘: <font class=‘bold "+JPYCNYOClass+"‘>"+JPYCNYOpen+"</font>");1315 $(‘.JPYCNYnowL‘).html("最低: <font class=‘bold "+JPYCNYLClass+"‘>"+JPYCNYLow+"</font>");1316 $(‘.JPYCNYnowH‘).html("最高: <font class=‘bold "+JPYCNYHClass+"‘>"+JPYCNYHigh+"</font>");1317 $(‘.JPYCNYnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+JPYCNYYClose+"</font>");1318 $(‘.JPYCNYnowN‘).html("现价: <font class=‘bold "+JPYCNYClass+"‘>"+JPYCNYNow+"</font>");1319 $(‘.JPYCNYnowV‘).html(1320 "涨跌额: <font class=‘bold "+JPYCNYClass+"‘>"1321 +Math.round((JPYCNYNow-JPYCNYYClose)*10000)/100001322 +"</font>"1323 );1324 $(‘.JPYCNYnowP‘).html(1325 "涨跌幅: <font class=‘bold "+JPYCNYClass+"‘>"1326 +Math.round(((JPYCNYNow-JPYCNYYClose)/JPYCNYYClose*100)*100)/1001327 + " %"+"</font>"1328 );1329 /*日中兑换End*/1330 /*美欧兑换Start*/1331 var USDEURData = DataWHHL.futures[3].split(",");1332 var USDEUROpen = USDEURData[4];1333 var USDEURLow = USDEURData[7];1334 var USDEURHigh = USDEURData[6];1335 var USDEURNow = USDEURData[5];1336 var USDEURYClose = USDEURData[3];1337 var USDEURClass = USDEURNow>USDEURYClose?"colorRed":(USDEURNow<USDEURYClose?"colorGreen":"colorGray");1338 var USDEUROClass = USDEUROpen>USDEURYClose?"colorRed":(USDEUROpen<USDEURYClose?"colorGreen":"colorGray");1339 var USDEURLClass = USDEURLow>USDEURYClose?"colorRed":(USDEURLow<USDEURYClose?"colorGreen":"colorGray");1340 var USDEURHClass = USDEURHigh>USDEURYClose?"colorRed":(USDEURHigh<USDEURYClose?"colorGreen":"colorGray");1341 $(‘.USDEURnowO‘).html("开盘: <font class=‘bold "+USDEUROClass+"‘>"+USDEUROpen+"</font>");1342 $(‘.USDEURnowL‘).html("最低: <font class=‘bold "+USDEURLClass+"‘>"+USDEURLow+"</font>");1343 $(‘.USDEURnowH‘).html("最高: <font class=‘bold "+USDEURHClass+"‘>"+USDEURHigh+"</font>");1344 $(‘.USDEURnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+USDEURYClose+"</font>");1345 $(‘.USDEURnowN‘).html("现价: <font class=‘bold "+USDEURClass+"‘>"+USDEURNow+"</font>");1346 $(‘.USDEURnowV‘).html(1347 "涨跌额: <font class=‘bold "+USDEURClass+"‘>"1348 +Math.round((USDEURNow-USDEURYClose)*10000)/100001349 +"</font>"1350 );1351 $(‘.USDEURnowP‘).html(1352 "涨跌幅: <font class=‘bold "+USDEURClass+"‘>"1353 +Math.round(((USDEURNow-USDEURYClose)/USDEURYClose*100)*100)/1001354 + " %"+"</font>"1355 );1356 /*美欧兑换End*/1357 //setTimeout(loadScript(‘AjaxDataWHHL‘,AjaxDataWHHLUrl,showAjaxDataWHHL),refreshTime);1358 // img data1359 /*汇率兑换*/1360 $(‘.USDCNYpicTime‘).attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?imagetype=RS&id=USDCNY0&dt="+new Date().getTime());1361 $(‘.USDCNYpicDay‘).attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=KS&ID=USDCNY0&UnitWidth=7&dt="+new Date().getTime());1362 $(‘.USDEURpicTime‘).attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?imagetype=RS&id=USDEUR0&dt="+new Date().getTime());1363 $(‘.USDEURpicDay‘).attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=KS&ID=USDEUR0&UnitWidth=7&dt="+new Date().getTime());1364 }1365 1366 function showAjaxDataMYZS(){1367 if(!DataMYZS){return;}1368 var refreshTime = 10000;1369 /*美元指数Start*/1370 var MYZSData = DataMYZS.futures[0].split(",");1371 var MYZSOpen = MYZSData[4];1372 var MYZSLow = MYZSData[7];1373 var MYZSHigh = MYZSData[6];1374 var MYZSNow = MYZSData[5];1375 var MYZSYClose = MYZSData[3];1376 var MYZSClass = MYZSNow>MYZSYClose?"colorRed":(MYZSNow<MYZSYClose?"colorGreen":"colorGray");1377 var MYZSOClass = MYZSOpen>MYZSYClose?"colorRed":(MYZSOpen<MYZSYClose?"colorGreen":"colorGray");1378 var MYZSLClass = MYZSLow>MYZSYClose?"colorRed":(MYZSLow<MYZSYClose?"colorGreen":"colorGray");1379 var MYZSHClass = MYZSHigh>MYZSYClose?"colorRed":(MYZSHigh<MYZSYClose?"colorGreen":"colorGray");1380 $(‘.MYZSnowO‘).html("开盘: <font class=‘bold "+MYZSOClass+"‘>"+MYZSOpen+"</font>");1381 $(‘.MYZSnowL‘).html("最低: <font class=‘bold "+MYZSLClass+"‘>"+MYZSLow+"</font>");1382 $(‘.MYZSnowH‘).html("最高: <font class=‘bold "+MYZSHClass+"‘>"+MYZSHigh+"</font>");1383 $(‘.MYZSnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+MYZSYClose+"</font>");1384 $(‘.MYZSnowN‘).html("现价: <font class=‘bold "+MYZSClass+"‘>"+MYZSNow+"</font>");1385 $(‘.MYZSnowV‘).html(1386 "涨跌额: <font class=‘bold "+MYZSClass+"‘>"1387 +Math.round((MYZSNow-MYZSYClose)*100)/1001388 +"</font>"1389 );1390 $(‘.MYZSnowP‘).html(1391 "涨跌幅: <font class=‘bold "+MYZSClass+"‘>"1392 +Math.round(((MYZSNow-MYZSYClose)/MYZSYClose*100)*100)/1001393 + " %"+"</font>"1394 );1395 /*美元指数End*/1396 //setTimeout(loadScript(‘AjaxDataMYZS‘,AjaxDataMYZSUrl,showAjaxDataMYZS),refreshTime);1397 // img data1398 /*美元指数*/1399 $(‘.MYZSpicTime‘).attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Picture/dini0RS.png?dt="+new Date().getTime());1400 $(‘.MYZSpicDay‘).attr("src","http://hqgjqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=KS&ID=DINI0&UnitWidth=7&dt="+new Date().getTime());1401 }1402 1403 function showAjaxDataHZLJ(){1404 if(!DataHZLJ){return;}1405 var refreshTime = 10000;1406 /*沪主力金Start*/1407 var HJZLData = DataHZLJ.futures[0].split(",");1408 var HJZLOpen = HJZLData[4];1409 var HJZLLow = HJZLData[7];1410 var HJZLHigh = HJZLData[6];1411 var HJZLNow = HJZLData[5];1412 var HJZLYClose = HJZLData[3];1413 var HJZLClass = HJZLNow>HJZLYClose?"colorRed":(HJZLNow<HJZLYClose?"colorGreen":"colorGray");1414 var HJZLOClass = HJZLOpen>HJZLYClose?"colorRed":(HJZLOpen<HJZLYClose?"colorGreen":"colorGray");1415 var HJZLLClass = HJZLLow>HJZLYClose?"colorRed":(HJZLLow<HJZLYClose?"colorGreen":"colorGray");1416 var HJZLHClass = HJZLHigh>HJZLYClose?"colorRed":(HJZLHigh<HJZLYClose?"colorGreen":"colorGray");1417 $(‘.HJZLnowO‘).html("开盘: <font class=‘bold "+HJZLOClass+"‘>"+HJZLOpen+"</font>");1418 $(‘.HJZLnowL‘).html("最低: <font class=‘bold "+HJZLLClass+"‘>"+HJZLLow+"</font>");1419 $(‘.HJZLnowH‘).html("最高: <font class=‘bold "+HJZLHClass+"‘>"+HJZLHigh+"</font>");1420 $(‘.HJZLnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+HJZLYClose+"</font>");1421 $(‘.HJZLnowN‘).html("现价: <font class=‘bold "+HJZLClass+"‘>"+HJZLNow+"</font>");1422 $(‘.HJZLnowV‘).html(1423 "涨跌额: <font class=‘bold "+HJZLClass+"‘>"1424 +Math.round((HJZLNow-HJZLYClose)*100)/1001425 +"</font>"1426 );1427 $(‘.HJZLnowP‘).html(1428 "涨跌幅: <font class=‘bold "+HJZLClass+"‘>"1429 +Math.round(((HJZLNow-HJZLYClose)/HJZLYClose*100)*100)/1001430 + " %"+"</font>"1431 );1432 /*沪主力金End*/1433 //setTimeout(loadScript(‘AjaxDataHZLJ‘,AjaxDataHZLJUrl,showAjaxDataHZLJ),refreshTime);1434 1435 // img data1436 /*沪主力金*/1437 $(‘.HJZLpicTime‘).attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=RS&ID=AUM1&refrence=rtj&dt="+new Date().getTime());1438 $(‘.HJZLpicDay‘).attr("src","http://hqgnqhpic.eastmoney.com/EM_Futures2010PictureProducter/Index.aspx?ImageType=KS&ID=aum1&UnitWidth=7&dt="+new Date().getTime());1439 }1440 1441 function showAjaxDataJY(){1442 if(!DataJY){return;}1443 var refreshTime = 10000;1444 /*美黄金Start*/1445 var MHJData = DataJY.futures[0].split(",");1446 var MHJOpen = MHJData[4];1447 var MHJLow = MHJData[7];1448 var MHJHigh = MHJData[6];1449 var MHJNow = MHJData[5];1450 var MHJYClose = MHJData[3];1451 var MHJClass = MHJNow>MHJYClose?"colorRed":(MHJNow<MHJYClose?"colorGreen":"colorGray");1452 var MHJOClass = MHJOpen>MHJYClose?"colorRed":(MHJOpen<MHJYClose?"colorGreen":"colorGray");1453 var MHJLClass = MHJLow>MHJYClose?"colorRed":(MHJLow<MHJYClose?"colorGreen":"colorGray");1454 var MHJHClass = MHJHigh>MHJYClose?"colorRed":(MHJHigh<MHJYClose?"colorGreen":"colorGray");1455 $(‘.MHJnowO‘).html("开盘: <font class=‘bold "+MHJOClass+"‘>"+MHJOpen+"</font>");1456 $(‘.MHJnowL‘).html("最低: <font class=‘bold "+MHJLClass+"‘>"+MHJLow+"</font>");1457 $(‘.MHJnowH‘).html("最高: <font class=‘bold "+MHJHClass+"‘>"+MHJHigh+"</font>");1458 $(‘.MHJnowYC‘).html("昨收: <font class=‘bold colorGray‘>"+MHJYClose+"</font>");1459 $(‘.MHJnowN‘).html("现价: <font class=‘bold "+MHJClass+"‘>"+MHJNow+"