- <form name=bf onSubmit="bottomForm();return false;">
- <script>
- function bottomForm(){
- var $=document.bf.key.value;
- if(document.bf.sto[0].checked)window.open("./plus/search.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="(輸入搜索內(nèi)容……)"> -->
- <input name="key" class="search-keyword" value="(輸入搜索內(nèi)容……)" onfocus="if(this.value=='(輸入搜索內(nèi)容……)'){this.value='';}" onblur="if(this.value==''){this.value='(輸入搜索內(nèi)容……)';}">
- <input name=sto type=radio value="0" checked=true>本站內(nèi)
- <input name=sto type=radio value="1"><a >百度</a>
- <input name=sto type=radio value="2"><a >Google</a>
- <!--
- <input name=sto type=radio value="3"><a >狗狗</a>
- <input name=sto type=radio value="4"><a >地圖</a>
- <input name=sto type=radio value="5"><a >百科</a>
- -->
- <button type="submit" class="search-submit">搜索</button>
- </div>
- </form>
- <form name=bf onSubmit="bottomForm();return false;">
- <script>
- function bottomForm(){
- var $=document.bf.key.value;
- if(document.bf.sto[0].checked)window.open("./plus/search.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="(輸入搜索內(nèi)容……)"> -->
- <input name="key" class="search-keyword" value="(輸入搜索內(nèi)容……)" onfocus="if(this.value=='(輸入搜索內(nèi)容……)'){this.value='';}" onblur="if(this.value==''){this.value='(輸入搜索內(nèi)容……)';}">
- <input name=sto type=radio value="0" checked=true>本站內(nèi)
- <input name=sto type=radio value="1"><a >百度</a>
- <input name=sto type=radio value="2"><a >Google</a>
- <!--
- <input name=sto type=radio value="3"><a >狗狗</a>
- <input name=sto type=radio value="4"><a >地圖</a>
- <input name=sto type=radio value="5"><a >百科</a>
- -->
- <button type="submit" class="search-submit">搜索</button>
- </div>
- </form>
更改dedecms的搜索框?yàn)樽约旱亩喙δ芩阉骺颍?br>
把 head.htm 的 <form>與</form>之間的代碼,替換為以下代碼:
|
其中,“blog.sina.com.cn” 換成你自己的獨(dú)立域名。
原來(lái)的以下這段,似乎是用不上了,本人這樣屏蔽掉:
<!--
<div class="tags">
<h4>熱門(mén)標(biāo)簽:</h4>
<ul>
{dede:tag row='10' getall='1' sort='month'}
<li><a href='[field:link/]'>[field:tag /]</a></li>
{/dede:tag}
</ul>
</div>
-->
此代碼修改自本論壇的一位師兄的,謝謝他!