var gp = v_sh600067.split("~"); $(function () { //当前价格:gp[3],昨日收盘价:gp[4], 时间:gp[30],涨跌:gp[31], if (gp[3] == '0.00') { $('#gp_price i').text(gp[4]); $('#gp_price').addclass('gpup'); } else { $('#gp_price i').text(gp[3]); if (gp[31] >= 0) { $('#gp_price').addclass('gpup'); } else { $('#gp_price').addclass('gpdown'); } } var gptime =gp[30]; var gptime1=gptime.substring(0,4)+"/"+gptime.substring(4,6)+"/"+gptime.substring(6,8)+" "+gptime.substring(8,10)+":"+gptime.substring(10,12)+":"+gptime.substring(12,14); $('#gp_time').text(gptime1); $('#gp_qrzg').text(gp[33]); $('#gp_qrzd').text(gp[34]); $('#gp_gjl').text(parsefloat((gp[36]/10000).tofixed(2)).tolocalestring()); $('#gp_cje').text(parsefloat((gp[37]/10000).tofixed(2)).tolocalestring()); });