How do I transform my search form so that on enter it simply redirects users to what they wrote?
I want to transform the searc开发者_StackOverflow社区hform so that when an user clicks enter it simply redirects him to http://chusmix.com/text<what he searched for>
I want to do this so I can add some extra tags in the search form without the user knowing.
This is the code I use to display the search form:
<li id="search-10" class="widget_search">
<form role="search" method="get" id="searchform" action="http://chusmix.com/">
<div>
<input class="ubicacion" type="text" value="" name="s" id="s" style="margin-left:418px;">
<input type="submit" id="searchsubmit" value="Buscar">
</div>
</form></li>
</ul>
Use JavaScript.
<form action="http://chusmix.com/" onsubmit="window.location = action + s.value; return false;">
<input name="s">
<input type="submit">
</form>
精彩评论