문제

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