一、
弹出层:
主页面:
var index = layui.layer.open({
title: "tile",
type: 2,
area: ['390px', '220px'],
content: "dialog",
btn: ['提交'],
yes: function (index) {
//当点击‘确定’按钮的时候,获取弹出层返回的值
var res = window["layui-layer-iframe" + index].callbackdata();
//打印返回的值,看是否有我们想返回的值。
console.log(res);
//最后关闭弹出层
layer.close(index);
},
二、
layer.prompt({
formType: 2
, title: 'title'
, value: ""
}, function (value, index) {
alert("q"+value);
});
手机扫一扫
移动阅读更方便
你可能感兴趣的文章