我复制了我正在开发的一个更大项目的一部分,我没有编写代码,所以我希望有人能帮助我找出为什么用这种方式从 js 代码发送 post 请求在 IE 中有效,而在其他中无效浏览器。
function f() {
var container = document.createElement("form");
container.method = "post";
container.action= "http://localhost:3203/somefile.aspx";
document.appendChild(container);
container.submit();
}
Try document.body.appendChild(container)
反而。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)