makeForm(data) {// 创建一个 formconst tempForm = document.createElement("form");tempForm.id = "tempForm";tempForm.name = "tempForm";tempForm.target = "_blank";// 添加到 body 中document.body.appendChild(tempForm);// 创建一个用户名输入const nameinput = document.createElement("input");// 设置相应参数nameinput.type = "text";nameinput.name = data.fromParamName;nameinput.value = data.fromParamValue;// 将该输入框插入到 form 中tempForm.appendChild(nameinput);// form 的提交方式tempForm.method = "POST";// form 提交路径tempForm.action = data.redirectUrl;// 对该 form 执行提交tempForm.submit();// 删除该 formdocument.body.removeChild(tempForm);}
