注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

火力光波的博客

火一般的热情 光一样的速度

 
 
 

日志

 
 

百度搜索引擎代码  

2017-11-23 20:23:14|  分类: 搜索代码 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

1、百度网页搜索代码

<table width=90% border=0 align="center" cellpadding=3 cellspacing=0>
<form action=http://www.baidu.com/s>
<input type=hidden name=tn value=sitesowang>
<tr><td width=985>
<input type=hidden name=cl value=3>
<input type=hidden name=rn value=10>
<input type=hidden name=ct value=0>
<input type=hidden name=lm value=0>
</td></tr>
<tr><td height="30" bgcolor="#F0F7FF">
<a href=http://d.baidu.com/index.php?tn=sitesowang>
<img src=http://www.hao123.com/logox.gif width=53 height=16 border=0></a>
<input type=text name=word size=40 onMouseOver=this.focus() onFocus=this.select()
onClick=if(this.value=='这里输入关键字')this.value=''>
<input type=submit value=搜索>
</td></tr>
</form>
</table> 

1截图效果:
测试1 - 火力光波 - 火力光波的博客

 来源:CSDN网 
 
 2、百度网页搜索代码

<form action="http://www.baidu.com/baidu" target="_blank">
<input name=tn type=hidden value=baidu>
<a href="http://www.baidu.com/"><imgsrc="http://img.baidu.com/img/logo-80px.gif" alt="Baidu" align="bottom" border="0"></a>
<input type="text"  name="word"  size=30><input type="submit"  value="百度搜索">
</td></tr></table>
</form>

2截图效果:
测试1 - 火力光波 - 火力光波的博客
  来源:度经验
 
 3、百度搜索框提示免费代码

<form action="http://www.baidu.com/baidu" target="_blank">
    <table bgcolor="#FFFFFF"><tr><td>
        <input name="tn" type="hidden" value="SE_zzsearchcode_shhzc78w">
        <a href="http://www.baidu.com/"><img src="http://img.baidu.com/img/logo-80px.gif" alt="Baidu" align="bottom" border="0"></a>
        <input type="text"  name="word" size="30" baiduSug="1">
        <input type="submit"  value="百度搜索">
    </td></tr></table>
</form>
<script charset="gbk" src="http://www.baidu.com/js/opensug.js"></script>

3截图效果:
测试1 - 火力光波 - 火力光波的博客

Javascript代码:
<script charset="gbk" src="http://www.baidu.com/js/opensug.js"></script>
提示:
Javascript代码请添加到网页中</body>标签的后面 如使用utf-8编码,则需要在
HTML代码中加入<input name="ie" type="hidden" value="utf-8">, 同时务必
在script标签中设置charset=gbk属性,否则搜索关键词和提示词会出现乱码。

来源:
搜网SOWANG 
  
4、百度网页搜索代码

<form onsubmit="return baiduWithHttps(this)" action="http://www.baidu.com/baidu" target="_blank">
    <input name="tn" type="hidden" value="SE_zzsearchcode_shhzc78w">
    <a href="https://www.baidu.com/" target="_blank">
        <img src="https://www.baidu.com/img/baidu_jgylogo3.gif" alt="Baidu" align="bottom" border="0">
    </a>
    <input type="text"  onfocus="checkHttps" name="word"  size="30">
    <input type="submit"value="百度搜索">
</form>
<script src="http://s1.bdstatic.com/r/www/cache/global/js/BaiduHttps_20150714_zhanzhang.js"></script>
<script>
    function checkHttps () {
        BaiduHttps.useHttps();   
    };
    function baiduWithHttps (formname) {
        var data = BaiduHttps.useHttps();
        if (data.s === 0) {
            return true;
        }
        else {
            formname.action = 'https://www.baidu.com/baidu' + '?ssl_s=1&ssl_c' + data.ssl_code;
            return true;
        }
    };
</script>

4截图效果:
测试1 - 火力光波 - 火力光波的博客
来源:
搜网SOWANG
 
 5、多类型百度搜索代码

<form onsubmit="return gowhere1(this)" target="_blank" name="search_form1" method="get" action="http://www.baidu.com/baidu">
    <table width="100%" height="80" cellspacing="0" cellpadding="0" border="0" style="font-family:宋体">
        <tbody>
            <tr>
                <td>
                    <table width="144%" height="80" cellspacing="0" cellpadding="0" border="0">
                        <input type="hidden" value="0" name="myselectvalue">
                        <input type="hidden" value="utf-8" name="ie">
                        <input type="hidden" name="tn" value="SE_zzsearchcode_shhzc78w">
                        <input type="hidden" name="ct">
                        <input type="hidden" name="lm">
                        <input type="hidden" name="cl">
                        <input type="hidden" name="rn">
                        <tbody>
                            <tr>
                                <td width="8%" valign="bottom">
                                    <div align="center">
                                        <a href="https://www.baidu.com/"  target="_blank">
                                            <img border="0" align="bottom" alt="Baidu" src="https://www.baidu.com/img/baidu_jgylogo3.gif">
                                        </a>
                                    </div>
                                </td>
                                <td width="92%" valign="bottom">

                                    <input type="radio" value="0" onclick="javascript:this.form.myselectvalue.value=4;" name="myselect">
                                    <font color="#0000cc">新闻</font>

                                    <input type="radio" value="0" onclick="javascript:this.form.myselectvalue.value=0;" name="myselect" checked="">
                                    <span class="f12"><font color="#0000cc">网页</font></span>

                                    <input type="radio" value="1" onclick="javascript:this.form.myselectvalue.value=1;" name="myselect">
                                    <span class="f12"><font color="#0000cc">音乐</font></span>

                                    <input type="radio" value="0" onclick="javascript:this.form.myselectvalue.value=6;" name="myselect">
                                    <font color="#0000cc">贴吧</font>

                                    <input type="radio" value="0" onclick="javascript:this.form.myselectvalue.value=5;" name="myselect">
                                    <font color="#0000cc">图片</font>

                                    <table width="100%" cellspacing="0" cellpadding="0" border="0" align="right">
                                        <tbody>
                                            <tr>
                                                <td style="padding-top:10px;">
                                                    <font>
                                                        <input id="word" type="text" name="word" size="40" onfocus="checkHttps">
                                                    </font>
                                                    <input  type="submit" value="百度一下">
                                                </td>
                                                <td><br></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td width="8%"></td>
                                <td width="92%"></td>
                            </tr>
                            <tr><td></td></tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</form>
<script src="http://s1.bdstatic.com/r/www/cache/global/js/BaiduHttps_20150714_zhanzhang.js"></script>
<script>
    function checkHttps () {
        BaiduHttps.useHttps();   
    };   
    function gowhere1 (formname) {
        var data = BaiduHttps.useHttps();
        var url;
        if (formname.myselectvalue.value == "0") {
            url = data.s == 0 ? "http://www.baidu.com/baidu" : 'https://www.baidu.com/baidu' + '?ssl_s=1&ssl_c' + data.ssl_code;
            document.search_form1.tn.value = "SE_zzsearchcode_shhzc78w";
            formname.method = "get";
        }
        if (formname.myselectvalue.value == "1") {           
            document.search_form1.tn.value = "SE_zzsearchcode_shhzc78w";
            document.search_form1.ct.value = "134217728";
            document.search_form1.lm.value = "-1";
            url = "http://mp3.baidu.com/m";
        }
        if (formname.myselectvalue.value == "4") {
            document.search_form1.tn.value = "SE_zzsearchcode_shhzc78w";
            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 = "SE_zzsearchcode_shhzc78w";
            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.tn.value = "SE_zzsearchcode_shhzc78w";
            document.search_form1.ct.value = "352321536";
            document.search_form1.rn.value = "10";
            document.search_form1.lm.value = "65536";
            url = "http://tieba.baidu.com";
        }
        formname.action = url;
        return true;
    }
</script>

 5截图效果:
测试1 - 火力光波 - 火力光波的博客
来源:
搜网SOWANG
 
 6、指定站点搜索代码

<form name="f1" onsubmit="return g(this)" target="_blank">
    <table bgcolor="#FFFFFF" style="font-size:9pt;">
        <tr height="60">
            <td valign="top" width="8%">
                <a href="https://www.baidu.com/"  target="_blank">
                    <img src="https://www.baidu.com/img/baidu_jgylogo3.gif" border="0" alt="baidu">
                </a>
            </td>
            <td>
                <input type="text" name="word" onfocus="checkHttps" size="30" maxlength="100">
                <input type="submit" value="百度搜索"><br>
                <input name="tn" type="hidden" value="SE_zzsearchcode_shhzc78w">
                <input name="cl" type="hidden" value="3">
                <input name="ct" type="hidden">
                <input name="si" type="hidden" value="www.sowang.com">
                <div class="mt10">
                    <input name="s" type="radio"> 互联网<input name="s" type="radio" checked> www.sowang.com
                </div>
            </td>
        </tr>
    </table>
</form>
<script src="http://s1.bdstatic.com/r/www/cache/global/js/BaiduHttps_20150714_zhanzhang.js"></script>
<script>
    function checkHttps () {
        BaiduHttps.useHttps();
    };
    function g(formname) {
        var data = BaiduHttps.useHttps();
        var url = '';
        url = data.s == 0 ? "http://www.baidu.com/baidu" : 'https://www.baidu.com/baidu' + '?ssl_s=1&ssl_c' + data.ssl_code;
        if (formname.s[1].checked) {
            formname.ct.value = "2097152";
        }
        else {
            formname.ct.value = "0";
        }
        formname.action = url;
        return true;
    };
</script>

6截图效果:
测试1 - 火力光波 - 火力光波的博客 
来源:
搜网SOWANG
  评论这张
 
阅读(12)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018