2015-08-08 59 views
1

我想以下特点:如何使用文本框和网址变量中的变量进行搜索?

  • 在文本框变量停留后,搜索按钮,点击了网址
  • 变量
  • 当我更改URL(编辑URL)&刷新,变量投入文本并进行新的搜索

我的搜索有很多页面。他们都使用ajax,除了第一页。那么我怎样才能把搜索结果在网页上的什么页面?

<form name="search1" action="/search.php" method="post"> 
 
      <input type="hidden" name="action" value="search"> 
 
      \t <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="" /> 
 
       \t <input type="submit" value="SEARCH" class="min" name="" /> 
 
       </div> 
 

 
      </form>

搜索的网址只显示/search.php,我想这些变量是在那里了。

回答

1

改变你的表格MethodGet

<form name="search1" action="/search.php" method="Get"> 

像这个变量将在网址 显示被我希望这将有助于你

+0

我尝试这样做,这都没有区别的url – teachme

+0

使用一个“提交”按钮,这将修复它 –

+0

我试过了,它不会改变任何东西 – teachme