底部用的几个实用代码

因为经常有人问我要底部的代码,我要一个个的复制发送,所以羡鱼整理出来发在这里,提供你们复制使用

运行时间

<!-- 网站运行计时统计 start-->
<center>
<span id="runtime_span"></span>
<script type="text/javascript">function show_runtime(){window.setTimeout("show_runtime()",1000);X=new 
Date("2/14/2021 00:00:00");
Y=new Date();T=(Y.getTime()-X.getTime());M=24*60*60*1000;
a=T/M;A=Math.floor(a);b=(a-A)*24;B=Math.floor(b);c=(b-B)*60;C=Math.floor((b-B)*60);D=Math.floor((c-C)*60);
runtime_span.innerHTML="本站已安全运行: "+A+"天"+B+"小时"+C+"分"+D+"秒"}show_runtime();</script>
</center>
<!-- 网站运行计时统计 over-->
HTML

这是我博客底部所使用的博客运行时间代码,添加到博客的底部footer.php文件中即可,记得改时间哦

底部统计

<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span id="busuanzi_container_site_pv">本站总访问量<span id="busuanzi_value_site_pv"></span></span>
PHP
<span id="busuanzi_container_site_uv">本站访客数<span id="busuanzi_value_site_uv"></span>人次</span>
PHP

这个是底部的总访问量和本站访客数,两个都可以用

阅读剩余
THE END