list=*** 为股票代码
代码:
<script type="text/javascript" src="http://hq.sinajs.cn/list=sh600383" charset="gb2312">
</script>
<script type="text/javascript" src="http://hq.sinajs.cn/list=sh600208" charset="gb2312">
</script>
<script type="text/javascript" src="http://hq.sinajs.cn/list=sz000046" charset="gb2312">
</script>
<script type="text/javascript" src="http://hq.sinajs.cn/list=sh600576" charset="gb2312">
</script>
<script type="text/javascript">
function formatFloat(src, pos)
{
return Math.round(src*Math.pow(10, pos))/Math.pow(10, pos);
}
var elements=hq_str_sh600383.split(",");
document.write("jd:"+elements[3]);
document.write(" "+formatFloat((elements[3]-elements[2])/elements[2]*100, 2));
document.write("<br />");
var elements2=hq_str_sh600208.split(",");
document.write("zb:"+elements2[3]);
document.write(" "+formatFloat((elements2[3]-elements2[2])/elements2[2]*100, 2));
document.write("<br />");
var elements3=hq_str_sz000046.split(",");
document.write("fh:"+elements3[3]);
document.write(" "+formatFloat((elements3[3]-elements3[2])/elements3[2]*100, 2));
document.write("<br />");
var elements4=hq_str_sh600576.split(",");
document.write("wh:"+elements4[3]);
document.write(" "+formatFloat((elements4[3]-elements4[2])/elements4[2]*100, 2));
document.write("<br />");
</script>