function sendConfirm() { disableBtn('#btnSearch');

var url = '../yd/ydquery';
var data = {	
    startDate: $('#startDate').val(),
    endDate: $('#endDate').val(),
    mailNumber: $('#mailNumber').val()
};
if (checkinput(data) && clickflag == false) {
    clickflag = true;
    $.post(url, data, null, 'json').done(function(re) {
        if (re.result == 'success') {
            table.reload('projectList', {
                res: re
            });
        } else {
            $('#startDate').val('');
            $('#endDate').val('');
            $('#mailNumber').val('');
            popAlert('提示', re.msg);
        }
    }).fail(function(e) {
        popAlert('提示', '网络错误,请重试');
    }).always(function() {
        enableBtn('#btnSearch');
        clickflag = false;
    });
}

};

$(document).ready(function() { $('#btnSearch').on('click', sendConfirm); });

Layui 表单查询按钮与 sendConfirm 事件绑定实现