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:refu Ndstatus, 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 (); }
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
JQuery Dynamic Submission Form