百度google搜索嵌入

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title>搜狗网址导航</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /><meta http-equiv="Content-Type" content="text/html;charset=utf-8"><meta name="keywords" content="123,网址导航" />
   
    <SCRIPT language=javascript>
        function gowhere1(formname)
        {
            var url;
            <!--新闻-->
            if (formname.myselectvalue.value == "1")
            {
                document.search_form1.tn.value = "news";
                document.search_form1.cl.value = "2";
                document.search_form1.rn.value = "20";
                document.search_form1.ie.value = "utf-8";
                url = "http://news.baidu.com/ns";
            }
            <!--网页-->
            if (formname.myselectvalue.value == "0")
            {
                url = "http://www.baidu.com/baidu";
                document.search_form1.tn.value = "baidu";
                formname.method = "get";
            }
            <!--贴吧-->
            if (formname.myselectvalue.value == "2")
            {
                document.search_form1.ie.value = "utf-8";
                document.search_form1.kw.value = document.getElementById("word").innerHTML;
                    url = "http://tieba.baidu.com";
            }
            <!--知道-->
            if (formname.myselectvalue.value == "3")
            {
                document.search_form1.pn.value = "0";
                document.search_form1.rn.value = "10";
               
                document.search_form1.word.value = document.getElementById("word").innerHTML;
                document.search_form1.lm.value = "0";
                url = "http://zhidao.baidu.com/search";
            }
            <!--音乐-->
            if (formname.myselectvalue.value == "4")
            {
                url = "http://mp3.baidu.com/m";
                document.search_form1.tn.value = "baidump3";
                document.search_form1.ct.value = "134217728";
                document.search_form1.lm.value = "-1";
                document.search_form1.ie.value = "utf-8";
            } 
            <!--图片-->
            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")
            {
                document.search_form1.ct.value = "301989888";
                document.search_form1.ie.value = "utf-8";
                document.search_form1.s.value = "25";
                document.search_form1.word.value = document.getElementById("word").innerHTML;
               
                url = "http://v.baidu.com/v";
            }
            <!--地图-->
            if (formname.myselectvalue.value == "7")
            {
                document.search_form1.newmap.value = "1";
                document.search_form1.ie.value = "utf-8";
                document.search_form1.s.value = "s%26wd%3D"+document.getElementById("word").innerHTML;
                url = "http://map.baidu.com/";
            }
           
            <!--百科-->
            if (formname.myselectvalue.value == "8")
            {
   
                document.search_form1.ie.value = "utf-8";
           
                document.search_form1.word.value = document.getElementById("word").innerHTML;
               
                url = "http://baike.baidu.com/";
            }
            <!--文库-->
            if (formname.myselectvalue.value == "9")
            {
      
                document.search_form1.ie.value = "utf-8";

                document.search_form1.word.value = document.getElementById("word").innerHTML;
               
                url = "http://wenku.baidu.com/search";
            }
            formname.action = url;
            return true;
        }
        </SCRIPT>
</head>
    <body>
        <form name="search_form1" target="_blank" onsubmit="return gowhere1(this)" align=center>
            <table width="920" height="60" border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" style=font-family:宋体 ><tr><td>
                <TABLE width="920" 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>
                                            <INPUT name=kw type=hidden>
                                                <INPUT name=word type=hidden>
                                                    <INPUT name=pn type=hidden>
                                                        <INPUT name=newmap type=hidden>
                                                        <INPUT name=s type=hidden>
                                                        <INPUT name=ie type=hidden>
                                                            <TR>
                                                                <TD width="8%" valign="center">
                                                                    <DIV align=center><a href="http://www.baidu.com/"><img src="http://www.baidu.com/img/bdlogo.gif"
                                                                        alt="Baidu" align="bottom" border="0"></a></DIV></TD>
                                                                <TD vAlign=bottom width="92%">
                                                                    <INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=1; 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=2; 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=3; type=radio value=0>
                                                                                    <FONT color=#0000cc style="FONT-SIZE: 12px">知道</FONT>
                                                                                    <INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=4; 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>
                                                                                           
                                                                                            <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=7; type=radio value=0>
                                                                                                    <FONT color=#0000cc style="FONT-SIZE: 12px">地图</FONT>
                                                                                               
                                                                                                    <INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=8; type=radio value=0>
                                                                                                        <FONT color=#0000cc style="FONT-SIZE: 12px">百科</FONT>
                                                                                                        <INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=9; 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="45">
                                                                                                               
                                                                                                                </FONT> <input type="submit" value="百度搜索"> </TD></TR>
                                                                                                   
                                                                                                    </form>
        <!-- 准备通过程序动态添加提示功能的input  -->
        <span id="alertSpan" ></span>
       
       
       
        <!-- google search  -->
       
        <form action="http://www.google.com/search"   name=f align=center>
            <span   id=hf></span>
            <table   cellspacing=0   cellpadding=0 width="920">
                <tr   valign=middle>
                    <TD width="8%" valign="left">
                        <DIV align=center><a href="http://www.google.com/search"><img src="http://a4.att.hudong.com/56/94/01300000674874127805943299457.jpg"
                            alt="Baidu" align="bottom" border="0"></a></DIV></TD>
                    <td   align=left>
                        <input   maxLength=256   size=45   name=q   value="" id="gugou">  
                            <script>  
                                document.f.q.focus();  
                                </script>  
                            <input   type=hidden   name=ie   value="UTF-8">
                                <input   type=hidden   name=oe   value="UTF-8">
                                    <input   name=hl   type=hidden   value=zh-CN>
                                        <input   type=submit   value="Google搜索" >
                                            </td>
                </tr>
            </table>
        </form>
       
    </body>
   
    <!-- 百度搜索框提示 -->
    <script charset="gbk" src="http://www.baidu.com/js/opensug.js"></script>
   
    <!-- 程序示例  -->
   
    <script type="text/javascript">
        var txtObj = document.getElementById("alertSpan");
       
        //回调函数,用于获取用户当前选择的文字
        function show(str){
            <!--txtObj.innerHTML = str;-->
        }
       
        var params = {
            "XOffset":0, //提示框位置横向偏移量,单位px
            "YOffset":0, //提示框位置纵向偏移量,单位px
            "width":204, //提示框宽度,单位px
            "fontColor":"#f70", //提示框文字颜色
            "fontColorHI":"#FFF",    //提示框高亮选择时文字颜色
            "fontSize":"13px",        //文字大小
            "fontFamily":"宋体",    //文字字体
            "borderColor":"gray",     //提示框的边框颜色
            "bgcolorHI":"#03c",        //提示框高亮选择的颜色
            "sugSubmit":false        //在选择提示词条是是否提交表单
        };
       
        BaiduSuggestion.bind("word",params,show);
        BaiduSuggestion.bind("gugou",params,show);
        </script>
</html>





























相关推荐