首页 > 其他 > 详细

随机显示广告图片

时间:2016-10-08 11:17:11      阅读:220      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>随机显示广告图片</title>
</head>
<body>

<script>
    advertisement = new Array(4);
    advertisement[0] = <img src="http://www.lanrentuku.com/down/js/images/12498863530.jpg" />;
    advertisement[1] = <img src="http://www.lanrentuku.com/down/js/images/12498863531.jpg" />;
    advertisement[2] = <img src="http://www.lanrentuku.com/down/js/images/12498863532.jpg" />;
    advertisement[3] = <img src="http://www.lanrentuku.com/down/js/images/12498863533.jpg" />;
    var index = Math.floor(Math.random() * advertisement.length);
    document.write(advertisement[index]);
</script>

<p>刷新下看看效果吧~</p>
    
</body>
</html>

 

随机显示广告图片

原文:http://www.cnblogs.com/lqcdsns/p/5937787.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!