开发者

x, y query parameters in Rails search form

开发者 https://www.devze.com 2023-02-15 20:58 出处:网络
I have a search form in a Rails app that generates the following HTML <form action=\"/users\" method=\"get\">

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

精彩评论

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