【发布时间】:2011-01-30 17:56:19
【问题描述】:
大家好,我有一个表单,用户可以点击 4 个按钮来提交。一个搜索所有内容,另一个搜索用户,另一个搜索剪辑,第四个搜索主题。现在我的问题是按钮的名称=类别和值=(搜索类型),我打算将用户发送到地址栏中的类别=值的搜索结果页面(使用 GET 方法)。这在 Firefox 上运行良好,但在使用 google chrome 时根本无法运行。有什么帮助吗?代码如下:
<form method="get" action="search.php" name="search" onsubmit="return Validate();">
<input type="text" class="searchit" title="Search..." name="search" id="search" /><br/>
<label><span> </span> <input name="submitter" type="submit" value="Search" class="searchsubmitButton" id="submitter" /></label>
<span class="searchfor">Search for:</span>
<label><span> </span> <input name="c" type="submit" value="Users" class="searchsubmitButton" id="submitter" /></label>
<label><span> </span> <input name="c" type="submit" value="Clips" class="searchsubmitButton" id="submitter" /></label>
<label><span> </span> <input name="c" type="submit" value="Topics" class="searchsubmitButton" id="submitter" /></label>
</form>
【问题讨论】:
-
您所说的“在 google chrome 中不可用”是什么意思?您是否收到错误消息?不想要的输出?给我们更多信息,我们将能够更好地帮助您。 :D
-
它不起作用,因为在地址栏中我没有得到 c=users 或 c=clips 或 c=topics,只是搜索=(搜索查询)。
-
正如我在下面建议的,将 字段放在 标签之外。