首页 > 其他 > 详细

layui layer.open弹出框获取不了 input框的值

时间:2019-09-21 19:04:29      阅读:398      评论:0      收藏:0      [点我收藏+]
            layer.open({
                title:‘添加管理员‘,
                type: 1,
                content: $(‘.add_html‘).html(), 
                btn:[‘添加‘, ‘取消‘],
                btnAlign:‘c‘,
                yes:function (index, layero) {
                    console.log($(‘input[name=user_name]‘).val());
                }
            });

一句话, 把 content参数的 html() 去掉就好, 即 content: $(‘.add_html‘) !

layui layer.open弹出框获取不了 input框的值

原文:https://www.cnblogs.com/pyspang/p/11564107.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!