如何在自己的网站上添加上 百度搜索  或是Google搜索 的搜索框

解决方案 »

  1.   

    去百度或google那里要源代码,粘贴到你的页面里就行了。
       google广告就是给你一段js代码,占到你想要出线的页面中就行了。
      

  2.   

    http://www.google.com.hk/search?q=你要查的关键字
      

  3.   

    创建一个TextBox1和一个Button1
    在Button1_Click里写入,去试一下你就明白了
    Response.Redirect("http://www.google.com.hk/search?q="+TextBox1.Text);
    百度的同理
      

  4.   

    Google 和 baidu 都有标准的代码,直接用就行
      

  5.   

    http://blog.csdn.net/gpcgpan/archive/2009/03/27/4029214.aspx
      

  6.   

    我想要的是像www.hao123.com 中的那个 百度搜索一样的 好实现吗
      

  7.   

    <form method="get" action="http://www.google.com/custom" target="_top">
    <table border="0" bgcolor="#ffffff">
    <tr><td nowrap="nowrap" valign="top" align="left" height="32">
    <a href="http://www.google.com/">
    <img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></a>
    </td>
    <td nowrap="nowrap">
    <input type="hidden" name="domains" value="www.dabaoku.com">
    <input type="text" name="q" size="31" maxlength="255" value="">
    <input type="submit" name="sa" value="搜索">
    </td></tr>
    <tr>
    <td> </td>
    <td nowrap="nowrap">
    <table>
    <tr>
    <td>
    <input type="radio" name="sitesearch" value="" checked="checked">
    <font size="-1" color="#000000">Web</font>
    </td>
    <td>
    <input type="radio" name="sitesearch" value="www.dabaoku.com">
    <font size="-1" color="#000000">www.dabaoku.com</font>
    </td>
    </tr>
    </table>
    <input type="hidden" name="client" value="pub-6854204841389277">
    <input type="hidden" name="forid" value="1">
    <input type="hidden" name="ie" value="GB2312">
    <input type="hidden" name="oe" value="GB2312">
    <input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1">
    <input type="hidden" name="hl" value="zh-CN">
    </td></tr></table>
    </form>
    http://www1.baidu.com/search/freecode.html
      

  8.   

    <select id="sel1">
    <option value="http://www.baidu.com/s?wd=">网页</option>
    <option value="http://news.baidu.com/ns?cl=2&rn=20&tn=news&word=">新闻</option>
    <option value="http://tieba.baidu.com/f?t=1&kw=">贴吧</option>
    <option value="http://zhidao.baidu.com/q?ct=17&pn=0&tn=ikaslist&rn=10&word=">知道</option>
    <option value="http://mp3.baidu.com/m?tn=baidump3&ct=134217728&lm=-1&t=2&word=">MP3</option>
    <option value="http://image.baidu.com/i?tn=baiduimage&ct=201326592&lm=-1&cl=2&t=12&word=">图片</option>
    <option value="http://video.baidu.com/v?ct=301989888&rn=20&pn=0&db=0&s=7&word=">视频</option>
    </select>
    <input id="word" type="text" />
    <input type="button" value="百度一下" onclick="baidu()" />
    <script>
    function baidu(){
    window.location = document.getElementById("sel1").value+escape(document.getElementById("word").value);
    }
    </script>