一段简单的顶部JS广告

一段简单的顶部JS广告

<SCRIPT LANGUAGE="JavaScript">
var rand1 = 0;
var useRand = 0;
images = new Array;
images[1] = new Image();
images[1].src = "http://www.wmzz55.com/a/2017-03-25/14904148877633.gif";
images[1].href = "http://www.doumi.com";
images[2] = new Image();
images[2].src = "http://wx.6080j.net/upload/vod/2017-03-23/201703231490238931.jpg";
images[2].href = "http://www.fitnessyan.cn/pcwap/lzy/laoyi.html";
images[3] = new Image();
images[3].src = "http://wx.dyxiazai.com/upload/vod/2017-03-24/201703241490340569.gif";
images[3].href = "/ce.html";
images[4] = new Image();
images[4].src = "http://wx.6080j.net/upload/vod/2017-03-23/201703231490238951.gif";
images[4].href = "http://www.fitnessyan.cn/pcwap/lzy/lao/index.html";
images[5] = new Image();
images[5].src = "http://www.wmzz55.com/a/2017-03-24/14903273722728.jpg";
images[5].href = "http://mp.weixin.qq.com/s?src=3&timestamp=1490414711&ver=1&signature=LtxdqPaS*4EqX9Ot7Yz9K82F2on-IncE-7o-A*z-kVezi9BXL8INq2IDzkDLsphMq4WaTSk0lgTrPMd3ARCE1MK-jng0vHbhXnuxQH3BGYflwjztyB2voctDgtOpxLKqPi6wekHj-0plLPis3wH3oBQgEwKSph50hkqAy6bNPuE=";

function swapPic() {
var imgnum = images.length - 1;
do {
var randnum = Math.random();
rand1 = Math.round((imgnum - 1) * randnum) + 1;
} while (rand1 == useRand);
useRand = rand1;
document.randimg.src = images[useRand].src;top:1px;
document.getElementById("randa").setAttribute("href",images[useRand].href);
}
window.onload =swapPic;
</script>
<div style="width:100%;position:fixed;top:1px; "><a id="randa" href=" "><img width="100%" height="150" name="randimg" src="image/1.jpg"></a></div>

 

posted on 2019-08-21 17:03  baker95935 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/baker95935/p/11389822.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值