开发者

x, y query parameters in Rails search form

I have a search form in a Rails app that generates the following HTML

<form action="/users" method="get">
  <fieldset>
    Search by name:
    <input class="tex开发者_运维百科t" id="query" name="query" type="text" value="" />
  </fieldset>
  <input class="submit" src="/images/buttons/search.png?1296324322" type="image" />
</form>

When I submit the form, the url has x and y query parameters in addition to the query one in the form:

http://.../users?query=test&x=8&y=21

where are these params coming from?


Browsers submit x and y parameters when you use an image as your submit button. The values signal the position within the image that the user clicked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜