java 类中写onclick

来源:互联网 发布:中国10大网络作家 编辑:程序博客网 时间:2024/06/05 08:11

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 //点击遮罩关闭            });        }
0 0
原创粉丝点击