{field:'caozuo',title:'操作',width:100,align:'center',
formatter:formatteroper,
}
function formatteroper(){
return '<a href="javascript:void(0)" onclick="showyssj();" >查看</a>';
};
showysssj放在$(function(){})里找不到,放在外面找的到。求解答
{field:'caozuo',title:'操作',width:100,align:'center',
formatter:formatteroper,
}
function formatteroper(){
return '<a href="javascript:void(0)" onclick="showyssj();" >查看</a>';
};
showysssj放在$(function(){})里找不到,放在外面找的到。求解答
因为放在$(function(){}); 中的话是在页面加载完之后立即执行的语句 但是 你的点击事件是在添加完元素之后才会执行