Вопрос

I have a form like follows:

<form action="" method="GET" data-ronsor-url="http://web-search.tk">
<input id="q">
<input type="submit" value="search">
</form>

But nothing is submitted. if the form was at http://web-search.tk/?q=mysearch, when the form is submitted, the url is http://web-search.tk/?, why is this. It worked before.

Note: I will delete this question if I get more than 1 downvotes

Это было полезно?

Решение 2

Try adding a name attribute to the form input:

<form action="" method="GET" data-ronsor-url="http://web-search.tk">
    <input id="q" name="q">
    <input type="submit" value="search">
</form>

I am not quite sure what are you trying to achieve but if you set the action attr = http://web-search.tk it performs the search at http://web-search.tk website.

You might be depending on some js if you wish to perform the search at your website, but again I'm not quite sure what's yor goal!

Good luck, hope it helps

Другие советы

You need to specify the form action and the name of the input (query) field (instead of, or in addition to, the id):

<form action="http://web-search.tk" method="GET">
<input name="q">
<input type="submit" value="search">
</form>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top