【网站代码】Emlog JavaScript随机背景图

<!-- 背景图-->
<script type="text/javascript">
var bodyBgs = [];
	bodyBgs[0] = "<?php echo TEMPLATE_URL; ?>images/bg/0.png";
	bodyBgs[1] = "<?php echo TEMPLATE_URL; ?>images/bg/1.png";
	bodyBgs[2] = "<?php echo TEMPLATE_URL; ?>images/bg/2.png";
	bodyBgs[3] = "<?php echo TEMPLATE_URL; ?>images/bg/3.png";
	bodyBgs[4] = "<?php echo TEMPLATE_URL; ?>images/bg/4.png";
	bodyBgs[5] = "<?php echo TEMPLATE_URL; ?>images/bg/5.png";
	bodyBgs[6] = "<?php echo TEMPLATE_URL; ?>images/bg/6.png";
	bodyBgs[7] = "<?php echo TEMPLATE_URL; ?>images/bg/7.png";
	bodyBgs[8] = "<?php echo TEMPLATE_URL; ?>images/bg/8.png";
	bodyBgs[9] = "<?php echo TEMPLATE_URL; ?>images/bg/9.png";
var randomBgIndex = Math.round( Math.random() * 9 );
        document.write('<style>body{background:url(' + bodyBgs[randomBgIndex] + ')}</style>');
</script>
阿强爱分享
  • 本文由 发表于 2019年6月5日15:32:00
  • 转载请务必保留本文链接:https://iooqp.cn/379.html
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: