ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 搜索功能想加入網站參數請問應該怎么辦剛剛問說是寫入表單隱藏域 5 0
123(不懂技術) SVIP會員 OEM版權 2020-07-05 15:04:49 私信
迅睿CMS版本:4.3.8 #搜索 #表單 #網站

搜索功能想加入網站url參數請問應該怎么辦 剛剛問說是寫入表單隱藏域。。但是好像寫錯了 請教一下

搜索框

<form class="search-form" action="/index.php" method="get">
<input type="hidden" name="s" value="news">
<input type="hidden" name="c" value="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="搜索內容..." name="keyword" >
<div class="input-group-btn">
<button class="btn default" type="submit"> <i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>

內容搜索

<form class="search-form">
<div class="input-group">
<input type="text" class="form-control" placeholder="搜索內容..." name="keyword" value='{$keyword}' id='search_keyword' onkeypress="if(event.keyCode==13) {dr_module_search('search_keyword');return false;}">
<div class="input-group-btn">
<button class="btn default" type="button" onclick="dr_module_search('search_keyword')"> <i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
<script>
     // 這段js是用來執行搜索的
     function dr_module_search(name) {
         var url="{Router::search_url($params, 'keyword', 'dayruicom')}";
         var value = $("#"+name).val();
         if (value) {
             location.href=url.replace('dayruicom', value);
         } else {
             $("#"+name).focus()
             dr_tips(0, "輸入關鍵字");
         }
         return false;
     }
 </script>
</form>

比如說https://127.0.0.1/html/xinwen.html?111 然后通過搜索按鈕后 會進入https://127.0.0.1/news/search/keyword-關鍵詞.html?111 這個頁面 然后url參數?111 不丟失

解決方案