网站集成百度搜索代码站内搜索 - 云起网

云起网

您现在的位置是:首页> 服务器相关 -> 网站集成百度搜索代码站内搜索

Article

网站集成百度搜索代码站内搜索

云起网2017-06-02 服务器相关440
可以让搜索出来的都是百度收录的页面,有利于百度SEO优化

网站站内搜索集成百度的搜索代码,有利于百度SEO优化,代码如下,可根据自己的域名修改:


<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.findide.com">
				<input name=ie type=hidden value=utf-8>
                <div class="mt10">
                    <input name="s" type="radio"> 互联网<input name="s" type="radio" checked> www.findide.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>


文章评论

共有0条评论来说两句吧...