with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];

修改成

with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];

ok了,现在我们就可以正常使用百度分享了。


这里再分享一个技能。如果你使用的是欲思WordPress主题,那么在IE浏览器下面会导致百度分享样子乱了,不过我们可以通过下面方式修改。将footer.php文件中的下面代码

with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];

移到js/jquery.js文件中的share:[{bdCustomStyle:"/wp-content/themes/yusi2.0/share.css"}],};代码后面,如下:

share:[{bdCustomStyle:"/wp-content/themes/yusi2.0/share.css"}],};with(document)0[(getElementsByTagName("head")[0]||body).appendChild(createElement("script")).src="/static/api/js/share.js?v=89860593.js?cdnversion="+~(-new Date()/36e5)];

然后网站在IE浏览器下百度分享就不会乱了。


点击进入下载

本博客文章除特别声明,全部都是原创!
原创文章版权归过往记忆大数据(过往记忆)所有,未经许可不得转载。
本文链接: 【网站升级到HTTPS后如何使用百度分享】(https://www.iteblog.com/archives/1955.html)
喜欢 (8)
分享 (0)
发表我的评论
取消评论

表情
本博客评论系统带有自动识别垃圾评论功能,请写一些有意义的评论,谢谢!