//使用POST方式打开界面 function doOpenPostWin(url, args, name, windowParam) { //创建表单对象 var _form = $("<form></form>", { ‘id‘: ‘tempForm‘, ‘method‘: ‘post‘, ‘action‘: url, ‘target‘: name, ‘style‘: ‘display:none‘ }).appendTo($("body")); //将隐藏域加入表单 for (var i in args) { _form.append($("<input>", { ‘type‘: ‘hidden‘, ‘name‘: args[i].name, ‘value‘: args[i].value })); } //绑定提交触发事件 _form.bind(‘submit‘, function() { window.open("about:blank", name, windowParam); }); //触发提交事件 _form.trigger("submit"); //表单删除 _form.remove(); }
调用
var windowParam = "height=510,width=750"; doOpenPostWin(sPath, [{ name: "CgPlanGUID", value: arrCgplanGUID.join(",")}], "新增采购计划合并", windowParam);
时间: 2024-11-08 22:21:56