java 类中写onclick

xiaoxiao2021-02-28  145

1、java类中写法

StringBuffer html = new StringBuffer(); html.append("<td><a href=\"#\" onclick=\"viewLog("+Id+");\">" + "详情日志" + "</a></td>");

2、jsp页面

function viewLog(Id){ layer.open({ title: '对比日志', type: 2, content: '/switch/switchAction!getNewPage.do?Id='+Id, area: ['870px', '510px'], shadeClose: true //点击遮罩关闭 }); }
转载请注明原文地址: https://www.6miu.com/read-29953.html

最新回复(0)