$(function(){
$("#tab tr td a.wancheng").click(function(){//单击某个图标
//响应到下单事件中
var tr = $(this).parent().parent();
var id = tr.find('span[id="hold_stockCode"]').text();
var statusTd = tr.find('span[id="wei"]');
$.post("script_wancheng.php",{script_id:id },function(date){
statusTd .html(date);
});
})
})
$("#tab tr td a.wancheng").click(function(){//单击某个图标
//响应到下单事件中
var tr = $(this).parent().parent();
var id = tr.find('span[id="hold_stockCode"]').text();
var statusTd = tr.find('span[id="wei"]');
$.post("script_wancheng.php",{script_id:id },function(date){
statusTd .html(date);
});
})
})
1#的代码只限于你只有一条数据,如果有多条数据,你的ID就冲突了
就是 <td align="center"><span id="wei"><?=$rs[wei]?></span></td>这个部分的 id="wei"最好换成class的,很简单