百度搜索框怎么做?
百度
作者: 神回复
2015-09-22 09:17:05
分享到:
[ 久闻导读 ] 我想在我站内做一个百度搜索框,但是不知道百度搜索框代码是什么,我看到很多网站都做了百度搜索框,请问一下百度搜索框怎么做,另外为什么现在的百度搜索框上面导航不见了,如果我做

问:我想在我站内做一个百度搜索框,但是不知道百度搜索框代码是什么,我看到很多网站都做了百度搜索框,请问一下百度搜索框怎么做,另外为什么现在的百度搜索框上面导航不见了,如果我做一个搜索框,是否可以调出百度搜索框导航?

答:由于2015年百度搜索改版,所以现在百度搜索框上面的导航消失了,不过如果你要安装百度搜索框的话,一样可以安装有导航的代码,他们的代码有三种,如下:

百度搜索框怎么做?

<form action="http://www.baidu.com/baidu" target="_blank">

<table bgcolor="#FFFFFF"><tr><td>

<input name=tn type=hidden value=baidu>

<a href="http://www.baidu.com/"><img src="http://img.baidu.com/img/logo-80px.gif" src="http://www.360zimeiti.com/uploads/allimg/150922/1-150922091Q4300.png" style="width: 519px; height: 98px;" />

<script language=javascript>

function gowhere1(formname)

{

 var url;

 if (formname.myselectvalue.value == "0")

 {

  url = "http://www.baidu.com/baidu";

  document.search_form1.tn.value = "baidu";

  formname.method = "get";

 }

 if (formname.myselectvalue.value == "1")

 {

  url = "http://mp3.baidu.com/m";

  document.search_form1.tn.value = "baidump3";

  document.search_form1.ct.value = "134217728";

  document.search_form1.lm.value = "-1";

 }

 

 if (formname.myselectvalue.value == "4")

 {

  document.search_form1.tn.value = "news";

  document.search_form1.cl.value = "2";

  document.search_form1.rn.value = "20";

  url = "http://news.baidu.com/ns";

 }

 if (formname.myselectvalue.value == "5")

 {

  document.search_form1.tn.value = "baiduiamge";

  document.search_form1.ct.value = "201326592";

  document.search_form1.cl.value = "2";

  document.search_form1.lm.value = "-1";

  url = "http://image.baidu.com/i";

}

if (formname.myselectvalue.value == "6")

 {

  url = "http://post.baidu.com/f";

  document.search_form1.tn.value = "baiduPostSearch";

  document.search_form1.ct.value = "352321536";

  document.search_form1.rn.value = "10";

  document.search_form1.lm.value = "65536";

 }

 

  formname.action = url;

 return true;

}

</script>

<form name="search_form1" target="_blank" onsubmit="return gowhere1(this)">

<table width="460" height="60" border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" style=font-family:宋体><tr><td>

<TABLE width="460" height="80" border=0 cellPadding=0 cellSpacing=0>

      <INPUT name=myselectvalue type=hidden value=0>

      <INPUT name=tn type=hidden>

      <INPUT name=ct type=hidden>

      <INPUT name=lm type=hidden>

      <INPUT name=cl type=hidden>

      <INPUT name=rn type=hidden>

      <TR>

                  <TD width="8%" valign="bottom">

                    <DIV align=center><a href="http://www.baidu.com/"><img src="http://img.baidu.com/img/logo-80px.gif"

alt="Baidu" align="bottom" border="0"></a></DIV></TD>

    <TD vAlign=bottom width="92%">

<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=4; type=radio value=0>

                    <FONT color=#0000cc style="FONT-SIZE: 12px">新闻</FONT>

 

                   <INPUT CHECKED name=myselect onclick=javascript:this.form.myselectvalue.value=0; type=radio value=0>

                    <SPAN class=f12><FONT color=#0000cc style="FONT-SIZE: 12px">网页</FONT></SPAN>

                    <INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=1; type=radio value=1>

                    <SPAN class=f12><FONT color=#0000cc style="FONT-SIZE: 12px">音乐</FONT></SPAN>

<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=6; type=radio value=0>

<FONT color=#0000cc style="FONT-SIZE: 12px">贴吧</FONT>

<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=5; type=radio value=0>

                    <FONT color=#0000cc style="FONT-SIZE: 12px">图片</FONT>

 

                    <TABLE align=right border=0 cellPadding=0 cellSpacing=0 width="100%">

                      <TBODY>

                        <TR>

                          <TD><FONT style="FONT-SIZE: 12px">

                            <input id=word name=word size="40">

                            </FONT> <input type="submit" value="百度搜索"> </TD></TR>

 

       </form>

百度搜索框怎么做?

<script language=javascript>

function g(formname)    {

var url = "http://www.baidu.com/baidu";

if (formname.s[1].checked) {

      formname.ct.value = "2097152";

}

else {

      formname.ct.value = "0";

}

formname.action = url;

return true;

}

</script>

<form name="f1" onsubmit="return g(this)">

<table bgcolor="#FFFFFF" style="font-size:9pt;">

<tr height="60"><td valign="top"><img src="http://img.baidu.com/img/logo-137px.gif" border="0" alt="baidu"></td>

<td>

<input name=word size="30" maxlength="100">

<input type="submit" value="百度搜索"><br>

<input name=tn type=hidden value="bds">

<input name=cl type=hidden value="3">

<input name=ct type=hidden>

<input name=si type=hidden value="www.baidu.com">

<input name=s type=radio> 互联网

<input name=s type=radio checked> www.baidu.com

</td></tr></table>

</form>

相关文章

  • 验证码: 看不清?点击更换 看不清? 点击更换
  • 意见反馈
    意见反馈
    返回顶部