• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
学习笔记
Misaka的学习笔记
博客园    首页    新随笔    联系   管理    订阅  订阅
打工笔记-------------layui弹出窗使用

//初体验
//layer.alert('内容')
//第三方扩展皮肤

//layer.alert('内容', {
// icon: 1,
// skin: 'layer-ext-moon' //该皮肤由layer.seaning.com友情扩展。关于皮肤的扩展规则,去这里查阅
//})


//询问框
//layer.confirm('您是如何看待前端开发?', {
// btn: ['重要', '奇葩'] //按钮
//}, function () {
// layer.msg('的确很重要', { icon: 1 });
//}, function () {
// layer.msg('的确是奇葩', { icon: 1 });
//});


//提示层
//layer.msg('玩命卖萌中', function () {
// //关闭后的操作
//});

layer.msg('更新成功',{time:1000}, function () {
parent.location.reload();    //刷新父页面   第二个参数设置msg显示的时间长短
});

 

//弹出窗
layer.open({
type: 2,
title: '请输入日期',
area: ['460px', '460px'],
content: '/View/UsedEdit.html',
btn: ['确认', '关闭'],
success: function (layero, index2) {
// 可用于 弹窗打开成功后初始化弹窗中的数据
var body = layer.getChildFrame('body', index2);
body.find("#txt_AddTime").val(olddatatime);
},
yes: function (index, layero) {
// 获取弹出框的值
var body = layer.getChildFrame('body', index);
// 根据formId获取form表单数据
datatime = body.find("#txt_AddTime").val();
//最后关闭弹出层
layer.close(index);
$.post(URL + "Block/CardListEditTime/", { Id: obj.title, Data: datatime, token: token },
function (data) {
if (data.success) {
layer.alert("提交成功",
{
icon: 6
},
function () {
window.location.href = "Used.html";
});
} else {
document.getElementById("span_tishi").innerHTML = data.msg;
}
});
}
});

posted on 2023-11-18 11:03  我们打工人  阅读(162)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3