layui 普通页面a 超级链接加弹窗传参
废话不多说,上代码
html部分
<button type="button" class="layui-btn layui-btn-warm layui-btn-sm" onclick="layuitc('{$val.title}','{$sort_id}','{$val.id}')" >查看图表</button>
js部分
<script type="text/javascript">
function layuitc(title,sort_id,subject_id){
layer.open({
type:2,//0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
area:['90%','90%'],
title:[title,'15px'],
content: '{:url("comment.pop/echarts")}?sort_id='+sort_id+'&subject_id='+subject_id,
})
}
</script>