【发布时间】:2015-11-01 04:31:52
【问题描述】:
我想要以下功能:
- 点击搜索按钮后变量停留在文本框中
- 网址中的变量
- 当我更改网址(编辑网址)并刷新时,将变量放入文本框并进行新搜索
我的搜索有很多页面。除了第一页,他们都使用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,我希望变量也在那里。
【问题讨论】:
标签: php html ajax .htaccess url