校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 網站建設 > 建站知識 > 織夢DeDeCms 5.6搜索框變為百度多功能搜索框的修改

織夢DeDeCms 5.6搜索框變為百度多功能搜索框的修改

POST TIME:2020-04-01 17:38

織夢5.6的默認搜索框是這樣子的,包括站內搜索、google搜索。

那么我們想要加入百度搜索功能需要怎么做呢?

請看織夢DeDeCms 5.6搜索框變為百度多功能搜索框的修改方法:

把head.htm的<form>與</form>之間的代碼,替換為以下代碼:


  1. <formname=bfonSubmit="bottomForm();returnfalse;">
  2. <script>
  3. functionbottomForm(){
  4. var$=document.bf.key.value;
  5. if(document.bf.sto[0].checked)window.open("./plus/search.php?kwtype=0&keyword="+$,"a1");
  6. if(document.bf.sto[1].checked)window.open("http://www.baidu.com/s?q1="+"&q6=blog.sina.com.cn","a2");
  7. if(document.bf.sto[2].checked)window.open("http://www.google.com/search?hl=zh-CN&q="+"&as_sitesearch=blog.sina.com.cn","a3");
  8. //if(document.bf.sto[3].checked)window.open("http://www.gougou.com/search?id=1&search="+$,"a4");
  9. //if(document.bf.sto[4].checked)window.open("http://map.baidu.com/m?word="+$,"a5");
  10. //if(document.bf.sto[5].checked)window.open("http://bk.baidu.com/?kw="+"&submit=search","a6");
  11. returnfalse}
  12. </script>
  13. <divclass="form">
  14. <h4>搜索</h4>
  15. <!--<inputname="key"class="search-keyword"value="(輸入搜索內容……)">-->
  16. <inputname="key"class="search-keyword"value="(輸入搜索內容……)"onfocus="if(this.value=='(輸入搜索內容……)'){this.value='';}"
  17. onblur="if(this.value=='')
  18. {this.value='(輸入搜索內容……)';}">
  19. <inputname=stotype=radiovalue="0"checked=true>站內搜索<inputname=stotype=radiovalue="1">
  20. <ahref="http://www.baidu.com">百度</a>
  21. <inputname=stotype=radiovalue="2"><ahref="http://www.google.cn">Google</a>
  22. <!--<inputname=stotype=radiovalue="3"><ahref="http://www.gougou.com">狗狗</a>
  23. <inputname=stotype=radiovalue="4"><ahref="http://map.baidu.com">地圖</a>
  24. <inputname=stotype=radiovalue="5"><ahref="http://baike.baidu.com">百科</a>-->
  25. <buttontype="submit"class="search-submit">搜索</button>
  26. </div>
  27. </form>

替換之后的效果是這樣子的

注:其中,“blog.sina.com.cn”換成你自己的獨立域名。



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 宽城| 保康县| 宣汉县| 平度市| 徐水县| 海门市| 镇宁| 奉节县| 卓资县| 那坡县| 东阳市| 吉木乃县| 镇宁| 鄂托克前旗| 思南县| 山丹县| 奉新县| 简阳市| 乐都县| 图们市| 梓潼县| 临沧市| 富川| 临西县| 清原| 长宁县| 武宣县| 兰考县| 东阳市| 印江| 万宁市| 高要市| 恩平市| 襄城县| 鹤岗市| 炉霍县| 黄骅市| 谷城县| 申扎县| 庆元县| 东港市|