按钮html标记不工作

按钮html标记不工作,html,Html,我有一个在数据库中搜索的简单表单,如下所示: <form action="search.html" method="get" name="search" class="field"> <input type="text" id="q" name="q" placeholder="what are you searching for?" /> <button type="button" id="search" name="Submit" value="Submit"

我有一个在数据库中搜索的简单表单,如下所示:

<form action="search.html" method="get" name="search" class="field">
<input type="text" id="q" name="q" placeholder="what are you searching for?" />
<button type="button" id="search" name="Submit" value="Submit" type="Submit">Search</button>
</form>

搜寻
当我点击提交按钮时,它什么也不做,为什么会这样


谢谢

您已经设置了两次
类型
属性:

<button type="button" id="search" name="Submit" value="Submit" type="Submit">Search</button>
        ^ here                                                 ^ and here
搜索
^这儿,这儿
删除第一个,因为它不允许多次具有相同的属性

同一开始标记上不得有两个或多个属性 名称之间是不区分大小写的ASCII匹配


更改按钮类型以提交搜索您希望如何处理此表单?action=“search.html”??提交表单时,您的代码在哪里?使用按钮类型提交工作正常,谢谢RP9查看