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);
        }
    });
};

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章