聯(lián)系官方銷售客服
1835022288
028-61286886
全站搜索時(shí),想要搜索幾個(gè)指定欄目的內(nèi)容應(yīng)該怎么設(shè)置;下邊是現(xiàn)在用的
<form class="search-form" action="/index.php" method="get"> <input type="hidden" name="c" value="api"> <input type="hidden" name="m" value="search"> <input type="hidden" name="dir" id="dr_search_module_dir" > <div class="input-group-btn btn-group" style="display: none;"> <button id="dr_search_module_name" type="button" class="btn default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <i class="fa fa-angle-down"></i> </button> <ul class="dropdown-menu"> <!--這是來(lái)列出全部可以搜索的內(nèi)容模塊--> {php $top_search=[];} {list action=cache name=module} {if !$t.setting.search.close} {php !$top_search && $top_search=$t;} <li><a target="_blank" href="[removed]dr_search_module_select('{$t.dirname}', '{$t.name}');"> {$t.name} </a></li> {/if} {/list} </ul> </div> <input type="text" name="keyword" value="請(qǐng)輸入關(guān)鍵詞" class="s_w" onblur="if (this.value ==''){this.value=this.defaultValue}" onclick="if(this.value=='請(qǐng)輸入關(guān)鍵詞')this.value=''" /> <input type="submit" name="submit" value="" class='an' style="border:0; padding: 0;" /> <script> // 這段js是用來(lái)執(zhí)行搜索的 function dr_search_module_select(dir, name) { $("#dr_search_module_dir").val(dir); $("#dr_search_module_name").html(name+' <i class="fa fa-angle-down"></i>'); } dr_search_module_select('{php echo defined('MOD_DIR') ? MOD_DIR : $top_search.dirname}', '{php echo defined('MODULE_NAME') ? MODULE_NAME : $top_search.name}'); </script> </form>
好像沒(méi)有辦法