百度首页充许我们添加自己的个性化导航,将自己常用的网站按分类添加到百度的首页上,不论在什么地方,只要登录到百度首页,就可以看到自己的导航,非常方便。那么如何快速的让用户将自己的网站地址添加到百度首页呢?

将该代码加入自己的文章页面即可!

需要修改的有两个地方(已用文字标明)

<div id=”sharetobaidu”>
百度新首页导航:
黍离的博客(这里填写自己网站的名称)
</div>
<script type=”text/javascript”>
function addtobaidu(siteinfo){
(
function(s, d, e) {
var u = location;
var f = ‘http://s.share.baidu.com?click=1&to=bdhome&from=addtobaidu&url=’ + siteinfo + ‘&title=’ + siteinfo.innerHTML + ‘-原创(窗口显示的名称后缀)’+ ‘&uid=&type=text&pic=&key=&sign=on&desc=&comment=&searchPic=&relatedUid=&l=&linkid=&sloc=&_t=’ + new Date().getTime();
function a() {
if (!window.open(f, ‘bdshare’, ‘toolbar=0,status=0,resizable=1,width=700,height=450,left=’ + (s.width – 700) / 2 + ‘,top=’ + (s.height – 650) / 2)) u.href = f;
};
if (/Firefox/.test(navigator.userAgent))
setTimeout(a, 0);
else
a();
}
)
(screen, document, encodeURIComponent)
}
</script>

Last modification:March 28th, 2020 at 05:24 am
If you think my article is useful to you, please feel free to appreciate