我在我的应用程序中创建了一个表单,如下所示:
<form action="/search/" method="get">
<input id="search-box" name="search" type="text" size=30 title="Search" value="" />
<input id="search-submit" type="image" alt="Search" src="/images/search-button.gif" />
</form>
但是当我提交表单时,会创建 URL,如下所示:
mysitename.com/search/?search=hello&x=0&y=0
谁能告诉我为什么这个 x 和 y 出现在我的 URL 中。如果我按如下方式更改表单代码,则在更多内容而不是图像按钮上,它工作正常,
<form action="/search/" method="get">
<input id="search-box" name="search" type="text" size=30 title="Search" value="" />
<input id="search-submit" type="submit" value="Search"/>
</form>
但我需要一个图像按钮来使我的表单看起来不错。请告诉我如何从 URL 中删除这些 x 和 y 参数。
您将始终获得提交按钮 type="image" 的鼠标坐标
您可以使用标准提交类型按钮,只需对其应用样式即可更改外观。
<input type="submit" id="search-submit" value=""
style="background-image: url(/images/search-button.gif); border: solid 0px #000000; width: WIDTHpx; height: HEIGHTpx;" />
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)