-
財(cái)富管理培訓(xùn)咨詢類網(wǎng)站...
-
齒輪設(shè)備類網(wǎng)站織夢模板...
-
網(wǎng)站優(yōu)化快速排名類科技...
-
玻璃制品廠家類網(wǎng)站織夢...
-
汽車銷售縱覽類網(wǎng)站織夢...
-
中英雙語建材瓷磚裝飾類...
-
重工業(yè)機(jī)械鋼鐵類網(wǎng)站織...
-
金屬工藝品加工廠家類網(wǎng)...
-
室內(nèi)設(shè)計(jì)裝修工程類網(wǎng)站...
-
壓濾機(jī)過濾設(shè)備類網(wǎng)站織...
-
大理石瓷磚生產(chǎn)類網(wǎng)站織...
-
蔬菜水果批發(fā)類網(wǎng)站織夢...
-
旅游公司類網(wǎng)站織夢模板...
-
汽車音箱喇叭低音炮類網(wǎng)...
-
家禽飼養(yǎng)基地類網(wǎng)站織夢...
-
戀愛情感資訊類網(wǎng)站織夢...
-
創(chuàng)業(yè)資訊博客教程類網(wǎng)站...
-
花卉養(yǎng)殖資訊類網(wǎng)站織夢...
-
電子產(chǎn)品營銷類網(wǎng)站織夢...
-
商用貨架展架類網(wǎng)站織夢...
打開你的首頁網(wǎng)站模板,在</head>之前加入
<span style="font-size:14px;"><script language="javascript" type="text/javascript" src="{dede:global.cfg_templets_skin/}/js/jquery-1.7.1.min.js"></script><script type="text/javascript">function lookup(inputString) {if(inputString.length == 0) {// Hide the suggestion box.$('#suggestions').hide();} else {$.post("/plus/search_list.php", {queryString: ""+inputString+""}, function(data){if(data.length >0) {$('#suggestions').show();$('#autoSuggestionsList').html(data);}});}} // lookupfunction fill(thisValue) {$('#inputString').val(thisValue);setTimeout("$('#suggestions').hide();", 200);}</script></span>
jquery-1.7.1.min.js這個(gè)jquery庫需要你自己下載,這里就不多說了。本人用的是這個(gè)版本的。
這段代碼中的search_list.php就是本文下載的文件,下載后放入/plus目錄下。
打開head.htm,找到搜索部分的from表單代碼修改為
<span style="font-size:14px;"><form name="formsearch" action="{dede:global.cfg_cmsurl/}/plus/search.php" id="formkeyword"><label for="header-subscribe-email"> </label><input type="hidden" name="kwtype" value="0" /><input type="text" name="q" size="24" value="在這里搜索..." onfocus="if(this.value=='在這里搜索...'){this.value='';}" onblur="if(this.value==''){this.value='在這里搜索...';}" id="inputString" onkeyup="lookup(this.value);" onblur="fill();"><input type="submit" value="搜索" /><div id="suggestions" ><div><ul id="autoSuggestionsList"></ul></div></div></form></span>
打開你自己的樣式表css文件,在最后加入
<span style="font-size:14px;">.suggestionsBox { position:relative; left:0px;width: 250px; background: white;border: 1px solid #dcdcdc;color: #323232; z-index:999; }.suggestionList { margin: 0px; padding: 0px; }.suggestionList li { margin: 0px 0px 3px 0px; position:relative;padding: 3px; cursor: pointer;list-style:none;padding-left:5px;height:20px;overflow:hidden}.suggestionList li:hover { background-color: #659CD8; }.jr{position:absolute;top:9px;right:-5px}</span>
然后下載search_list.rar,下載后解壓得search_list.php到放入/plus目錄下。在這個(gè)文件里有詳細(xì)注解。可根據(jù)實(shí)際情況調(diào)整。所有結(jié)果都是由這個(gè)文件來返回的。


