html - IE8不提交表单隐藏输入

标签 html forms post internet-explorer-8

我在一个项目中找到了这个表单,它在 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/

相关文章:

javascript - 如何应用 CSS

java - 使用 Spring MVC 无法同时正确打印 ArrayList 和 HTML 中的表单

javascript - 提交时将表单数据发送到 Javascript

javascript - 在同一个 iframe 中而不是子 iframe 中加载在 iFrame 内提交的表单

带代理的Java多线程post方法(使用Jsoup)

javascript - 跳转到图像 map 上的特定位置

javascript - Accordion 箭头定位在 div 内

javascript - jquery - 动态添加字段到表单 - 提交表单时帖子丢失数据

php - 复选框和 php

html - 不带参数发送的帖子