为什么Internet Explorer在表单POST中发送Button?

时间:2014-02-28 05:42:22

标签: html django internet-explorer post

我有一个非常简单的问题。我想找到Internet Explorer<button>作为POST请求的参数发送给服务器的原因?

代码

<form method="POST" action"./" name="request_form">
    <input type="text" name="name">
    <input type="text" name="email">

    <button name="jack" type="search_form" class="btn btn-primary">Search</button>

</form>

在此代码中,我在name, email and jack中收到了POST。这是为什么? 它在Firefoxchrome中正常运行。

1 个答案:

答案 0 :(得分:1)

按钮标签只有三种类型

button
reset
submit 

但你使用了type =“search_form”

尝试以下代码

<button name="jack" type="submit" class="btn btn-primary">Search</button>