最近在写一个信息平台的页面,想用一些弹出层,但是呢写的不太熟练,所以想到了用layer移动端的弹出层
//页面层
layer.open({
type: 1
,content: '可传入任何内容,支持html。一般用于手机页面中'
,anim: 'up'
,style: 'position:fixed; bottom:0; left:0; width: 100%; height: 200px; padding:10px 0; border:none;'
});
上面是layer移动端页面层代码
复制过来之后想改变content中的内容代码如下
//页面层
layer.open({
type: 1
// ,content: $('#ChooseCategory').html()
,content: document.getElementById('ChooseCategory')[xss_clean]
,anim: 'up'
,style: 'position:fixed; bottom:0; left:0; width: 100%; height: 200px; padding:10px 0; border:none;'
});
上面注释掉那行是jquer的方法,如果没引用jquer之间用下面这行就可以
html部分的代码
<div id="ChooseCategory" style="display: none">
<a style="color: cadetblue">123</a>
</div>
效果图:
标签: content
版权声明:本站所有图片/内容除标明原创外,均来自网络转载,版权归原作者所有,如果有侵犯到您的权益,请联系本站删除,谢谢!