我做了个股票行情页面,页面中需要列出最近访问的股票代码和对应的实时最新价和涨幅。    代码如下:
    
    table width="201" cellpadding="0" cellspacing="0" class="tbl3">
<tbody><tr class="alter">
 <td align="left">股票名称</td>
 <td align="left">最新价</td>
 <td align="right">涨跌幅</td>
</tr>
<tr>
<td>浦发银行</td>
<td><span>--(最新价)</span></td>
<td><span>--(涨幅)</span></td>
</tr>
<tr>
<td>招商银行</td>
<td><span>--(最新价)</span></td>
<td><span>--(涨幅)</span></td>
</tr>

</tbody>
</table>
  
    因为这个访问历史的股票记录的涨幅和最新价在开盘时间内,间隔5秒是会更新的
所以我就将  <td><span>--(最新价)</span></td>====>变成
<td><span autoquote="stockid:600036,attr:price"><span>13.26</span></span></td>
<td><span autoquote="stockid:600000,attr:upprice"><span>11.22</span></span></td>
然后利用javasript间隔5秒的时候,解析整个<body></body>内的全部html含有  autoquote="stockid:\d{6}" 标签
然后得到全部的 stockids="600036,600000"  然后通过ajax请求/bb.aspx?stockids=600036,600000
获取对应的每只股票行情  var 600036="最新价数字,涨幅数字"; var 600000="最新价数字,涨幅数字";
然后分别解析每个接受到的行情变量将<span autoquote="stockid:600036,attr:price"></span>的里面内容赋值
====================================
逻辑还有点难说清楚,不知道各位能明白吗?这样jquery怎么实现?