选中当前行wid

$('#shipWarnTable tbody').on('click', '.detail', function() {
var selId = $(this).parents('tr').find('[name=codeChk]').val();
for(var i=0;i<res.length;i++){
if(res[i].WID == selId){
selData = res[i];
}
}
var index = layer.open({
type : 2,
title : '预案详情',
content: '${ctx}/reserve/res/findbyid.action?wid='+ selId
});
layer.full(index);
});

原文地址:https://www.cnblogs.com/123456puke/p/8531352.html