var PostNewPage=function (url, params) { var temp_form = document.createElement("form"); temp_form.action = url; temp_form.target = "_blank"; temp_form.method = "post"; temp_form.style.display = "none"; for (var x in params) { var opt = document.createElement("textarea"); opt.name = x; opt.value = params[x]; temp_form.appendChild(opt); } document.body.appendChild(temp_form); temp_form.submit(); }
调用方式:PostNewPage("/ContextManager/GOrderDetail/", { orderID: orderID });