如何在文本框中搜索变量&url变量


How to make a search with variables in textboxes & url variables?

我想要以下功能:

  • 变量在点击搜索按钮后留在文本框中
  • url中的
  • 变量
  • 当我改变url(编辑url) &刷新,将变量放入文本框并进行新的搜索

我的搜索有很多页面。除了第一页,所有这些都使用ajax。那么,如何在url中放置搜索结果所在的页面呢?

<form name="search1" action="/search.php" method="post">
            <input type="hidden" name="action" value="search">
            	<div class="box">
                    <span>What:</span>
                    <input type="text" placeholder="job title, keywords or company" value="{keyword}" name="keyword" />
                    <em>job title, keywords or company</em>
                </div>
                <div class="box">
                    <span>Where:</span>
                    <input type="text" placeholder="city or postcode" value="" name="location" />
                    <em>city</em>
                </div>
                <div class="box box_submit">
                    <input type="submit" value="FIND" class="max" name="" />
                	<input type="submit" value="SEARCH" class="min" name="" />
                </div>
            </form>

搜索的url只显示/search.php,我希望变量也在那里

Change Your Form Method to Get:

<form name="search1" action="/search.php" method="Get">
像这样,变量将显示在url中我希望这对你有帮助