layer.open获取弹出层的input框的值

 

 

 

使用top.$('#txtReason').val();获取值;
//不通过
function unAuditData(id) {

    parent.layer.open({
        type: 1,
        title: '未通过原因',
        skin: 'layui-layer-molv',
        closeBtn: 0,
        shadeClose: true,
        shade: false,
        area: ['300px', '180px'],
        content:'<div id="mydiv" style="margin-left:10px;margin-top:10px;"><textarea id="txtReason" style="width:280px;height:70px;resize:none;border-radius:6px;border-color:red;" ></textarea></div>',
        btn: ['确定', '取消']
        , yes: function (index, layero) {
            var txtReason = top.$('#txtReason').val();
            alert(txtReason);
        }
    });
};

 

posted @ 2020-02-24 16:42  许宝  阅读(6515)  评论(1)    收藏  举报