我在一个项目中找到了这个表单,它在 Chrome 中工作正常,但在 Internet Explorer 中却不行。 IE8 确实以 POST 方式提交表单,但不发送隐藏的输入:
<form name="logout_frm" id="logout" action="index.php" method="post">
<label>Logout</label>
<input type="hidden" name="logout" value="1" />
<input type="submit" name="logoutBtn" value="logout" />
</form>
这是我从fiddle2 得到的原始数据WebForms 选项卡也是空的:
POST https://example.com/index.php HTTP/1.1
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, */*
Referer: https://hostname.net/index.php
Accept-Language: de-DE
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Host: hostname.net
Content-Length: 0
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: GUEST_LANGUAGE_ID=en_US; COOKIE_SUPPORT=true; ntlm=1; PHPSESSID=28b0fbgol5bnq56qqst423p80ota470sqclbnpc4p5egqqdbt4tw
Authorization: NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAAAbEdAAAAAA==
更新
如果我清除缓存并重新加载页面,它会工作一次但只有一次。也许这与 NTLM 登录 Authorization: NTLM
有某种关系。
最佳答案
您重复了 logout
名称。重命名隐藏字段或表单。
关于html - IE8不提交表单隐藏输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22962388/