实用小技巧>运维相关>正文
效果显示:
JS代码:
$(function () { $.getJSON('https://api.yum6.cn/baidu/query.php?url='+window.location.href, function(json, textStatus) { if (json.state == 1) { $('#ae_bdcx').html('本文已被百度收录!'); $("#ae_bdcx").attr('href','https://www.baidu.com/s?wd='+window.location.href); }else{ $('#ae_bdcx').html('坐等收录'); $('#ae_bdcx').css('color','#ff0000'); $('#ae_bdcx').attr('href','http://zhanzhang.baidu.com/sitesubmit/index?sitename='+window.location.href); var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') {bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';} else {bp.src = 'http://push.zhanzhang.baidu.com/push.js';} var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(bp, s); } }); });
文字显示框代码
<span><i class="fa fa-tag fa-fw"></i><a id="ae_bdcx" rel="external nofollow" target="_blank"></a></span>
说明:详情可参考本站的配置。如有疑问,欢迎留言咨询。
本文链接:https://www.weguiding.com/yuwei/547.html
猜你喜欢
- 21-04-02 阿里云CDN中SSL证书自动续签失败怎么处理
- 20-08-18 如何让自己的服务器支持CNAME解析绑定域名
- 19-07-18 RHSA-2018:3665-重要: NetworkManager 安全更新
- 19-07-16 xshell链接虚拟机中的Linux系统
- 19-07-16 RHSA-2019:0049-重要: systemd 安全更新
- 19-07-16 RHSA-2018:0260-中危: systemd 安全更新
- 19-07-16 RHSA-2018:3032-低危: binutils 安全和BUG修复更新
- 19-07-16 RHSA-2018:1700-重要: procps-ng 安全更新
- 19-07-16 RHSA-2018:3665-重要: NetworkManager 安全更新
- 图文推荐