我想要以下功能:
我的搜索有很多页面。除第一页外,所有这些都使用ajax。那么我怎样才能将搜索结果的页面放在网址中?
<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>
&#13;
搜索的网址只显示/search.php,我也希望变量也存在。
答案 0 :(得分:1)
将您的表单Method
更改为Get
:
<form name="search1" action="/search.php" method="Get">
像这样,变量将显示在网址中 我希望这会对你有所帮助