• jquery动态创建form表单


    function exportExcel() {
            var merchantName = $('#merchantName').val();
            var merchantNo = $('#merchantNo').val();
            var orderNo = $('#orderNo').val();
            var phone = $('#phone').val();
            var orderStatus = $('#orderStatusCombobox').combobox('getValue');
            var paidStatus = $('#hasPaidCombobox').combobox('getValue');
            var refundStatus = $('#hasRefundCombobox').combobox('getValue');
            var firstDealStatus = $('#firstDealCombobox').datebox('getValue');
            var createDateFrom = $('#createDateFrom').datebox('getValue');
            var createDateTo = $('#createDateTo').datebox('getValue');
            var opts = $('#orderDetailGrid').datagrid('options');
            var params = {
                merchantName: merchantName,
                merchantNo: merchantNo,
                orderNo: orderNo,
                phone: phone,
                orderStatus: orderStatus,
                paidStatus: paidStatus,
                refundStatus: refundStatus,
                firstDealStatus: firstDealStatus,
                createDateFrom: createDateFrom,
                createDateTo: createDateTo,
                page: opts.pageNumber,
                rows: opts.pageSize
            };
            $("body").append("<form></form>");
            $("body").find("form").attr("action", '/yami/backend/order.exportOrderDetails.do');
            $("body").find("form").attr("method", "post");
            $("body").find("form").attr("style", "display:none");
            $.each(params, function (k, v) {
                $("body").find("form").append("<input type='text' name='" + k + "' value = '" + v + "'></input>");
            });
            $("body").find("form").submit();
        }

  • 相关阅读:
    第14周总结
    第十三周总结
    第十二周总结
    第十一周总结
    第十次助教小结
    第九次小结-关注的助教
    第八次点评
    助教总结
    助教小结13
    助教小结12
  • 原文地址:https://www.cnblogs.com/llguanli/p/6916357.html
Copyright © 2020-2023  润新知