abstract:layui.use('layer', function(){ var $ = layui.jquery, layer = layui.layer;} //触发事件 var active = { setTop: function(){ var that = this;&n
layui.use('layer', function(){
var $ = layui.jquery, layer = layui.layer;}
//触发事件
var active = {
setTop: function(){
var that = this;
//多窗口模式,层叠置顶
layer.open({
type: 2 //此处以iframe举例
,title: '当你选择该窗体时,即会在最顶端'
,area: ['390px', '260px']
,shade: 0
,maxmin: true
,offset: [ //为了演示,随机坐标
Math.random()*($(window).height()-300)
,Math.random()*($(window).width()-390)
]
,content: '//layer.layui.com/test/settop.html'
,btn: ['继续弹出', '全部关闭'] //只是为了演示
,yes: function(){
$(that).click();
}
,btn2: function(){
layer.closeAll();
}
Correcting teacher:查无此人Correction time:2019-05-05 09:18:07
Teacher's summary:完成的不错。layui框架的js操作很简单。要练习。