日期:2014-05-16 浏览次数:20532 次
$("input[type='button']").click(function(){
var tr = $($(this).parents("tr"));
var id = $.trim(tr.find("td:nth-child(1)").text());
var category = $.trim(tr.find("td:nth-child(2)").text());
var name = $.trim(tr.find("td:nth-child(3)").text());
var sequence = $.trim(tr.find("td:nth-child(4)").text());
$('#sid').attr('value',id);
$("#scategory option[value="+category+"]").attr("selected",true);
$('#sname').attr('value',name);
$('#ssequence').attr('value',sequence);
});