不少朋友使用織夢dedecms搭建網站的時候,希望在搜索框里面能整合各大搜索引擎,通過下面方面可以整合各大搜索引擎。
編輯打開模板文件 head.htm,把
與
之間的代碼,替換為以下代碼:
<form name=bf *****ubmit="bottomForm();return false;"> <script> function bottomForm(){ var $=document.bf.key.value; if(document.bf.sto[0].checked)window.open("./plusarch.php?kwtype=0&keyword="+$,"a1"); if(document.bf.sto[1].checked)window.open("http://www.baidu.com/s?q1="+"&q6=blog.sina.com.cn","a2"); if(document.bf.sto[2].checked)window.open("http://www.google.com/search?hl=zh-CN&q="+"&as_sitesearch=blog.sina.com.cn","a3");// if(document.bf.sto[3].checked)window.open("http://www.gougou.com/search?id=1&search="+$,"a4");// if(document.bf.sto[4].checked)window.open("http://map.baidu.com/m?word="+$,"a5");// if(document.bf.sto[5].checked)window.open("http://bk.baidu.com/?kw="+"&submit=search","a6"); return false} </script> <div class="form"> <h4>搜索</h4><!– <input name="key" class="search-keyword" value="(輸入搜索內容……)"> –><input name="key" class="search-keyword" value="(輸入搜索內容……)" onfocus="if(this.value==’(輸入搜索內容……)’){this.value=”;}" onblur="if(this.value==”){this.value=’(輸入搜索內容……)’;}"> <input name=sto type=radio value="0" checked=true>本站內 <input name=sto type=radio value="1"><a href="http://www.baidu.com">百度</a> <input name=sto type=radio value="2"><a href="http://www.google.cn">Google</a><!– <input name=sto type=radio value="3"><a href="http://www.gougou.com">狗狗</a> <input name=sto type=radio value="4"><a href="http://map.baidu.com">地圖</a> <input name=sto type=radio value="5"><a href="http://baike.baidu.com">百科</a>–> <button type="submit" class="search-submit">搜索<tton> </div> </form>其中,“blog.sina.com.cn” 換成你自己的獨立域名。
原來的以下這段,似乎是用不上了,本人這樣屏蔽掉:
<!– <div class="tags"> <h4>熱門標簽:</h4> <ul> {dede:tag row=’10′ getall=’1′ sort=’month’} <li><a href=’[field:link/]‘>[field:tag /]</a><> {/dede:tag} </ul> </div>–>以上就是dedecms的整合各大搜索引擎實多功能搜索框的方法的全部內容,希望對大家的學習和解決疑問有所幫助,也希望大家多多支持武林網。新聞熱點
疑難解答