js post 傳遞引數
阿新 • • 發佈:2018-12-21
function spanedit(id) { event.stopPropagation(); var params = new Array(); params['id'] = 'id'; //params.push({ name: "id", value: id}); var temp = document.createElement("form"); temp.action = "/epmaster/deansystem/organization/organization_edit"; temp.method = "post"; temp.style.display = "none"; for (var x in params) { var opt = document.createElement("input"); opt.name = x; opt.value = params[x]; temp.appendChild(opt); } document.body.appendChild(temp); temp.submit(); return temp; }