<!--html内容-->
<td>
<a onclick="checkEr(${activitys.id})">查看二维码</a>
<div id="formTab${activitys.id}" style="display:none;" class="d_table_form"></div>
</td>
<script type="text/javascript" src="../js/qrcode.js"></script>
<script type="text/javascript">
function checkEr(activityId){
//清空DIV内容
$("#formTab"+activityId).html("");
//生成二维码
var qrcode = new QRCode("formTab"+activityId, {
text: "${ctx}/mobileApi/activit/saveActivitySignIn?activityid="+activityId,
width: 350,
height: 350,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
layer.open({
type: 1,
title: "二维码",
content : $("#formTab"+activityId),
area: ['420px', '430px'],
shadeClose : false
})
}
</script>
效果如下图