国产99久久精品_欧美日本韩国一区二区_激情小说综合网_欧美一级二级视频_午夜av电影_日本久久精品视频

最新文章專題視頻專題問(wèn)答1問(wèn)答10問(wèn)答100問(wèn)答1000問(wèn)答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問(wèn)答文章1 問(wèn)答文章501 問(wèn)答文章1001 問(wèn)答文章1501 問(wèn)答文章2001 問(wèn)答文章2501 問(wèn)答文章3001 問(wèn)答文章3501 問(wèn)答文章4001 問(wèn)答文章4501 問(wèn)答文章5001 問(wèn)答文章5501 問(wèn)答文章6001 問(wèn)答文章6501 問(wèn)答文章7001 問(wèn)答文章7501 問(wèn)答文章8001 問(wèn)答文章8501 問(wèn)答文章9001 問(wèn)答文章9501
當(dāng)前位置: 首頁(yè) - 科技 - 知識(shí)百科 - 正文

javascript實(shí)現(xiàn)循環(huán)廣告條效果

來(lái)源:懂視網(wǎng) 責(zé)編:小OO 時(shí)間:2020-11-27 22:24:02
文檔

javascript實(shí)現(xiàn)循環(huán)廣告條效果

本文實(shí)例為大家分享了javascript實(shí)現(xiàn)循環(huán)廣告條的具體代碼,供大家參考,具體內(nèi)容如下:html代碼。<;<。DOCTYPE html>;<;html>;<;head>;<;title>;Rotating Banner<;/title>;<;script src="script07.js">;<;/script>;<;link rel="stylesheet" href="script01.css" rel="external nofollow" >;<;/head>;<;body>;<;div class="centered">;<;<;/div>;<;/body>。
推薦度:
導(dǎo)讀本文實(shí)例為大家分享了javascript實(shí)現(xiàn)循環(huán)廣告條的具體代碼,供大家參考,具體內(nèi)容如下:html代碼。<;<。DOCTYPE html>;<;html>;<;head>;<;title>;Rotating Banner<;/title>;<;script src="script07.js">;<;/script>;<;link rel="stylesheet" href="script01.css" rel="external nofollow" >;<;/head>;<;body>;<;div class="centered">;<;<;/div>;<;/body>。

本文實(shí)例為大家分享了javascript實(shí)現(xiàn)循環(huán)廣告條的具體代碼,供大家參考,具體內(nèi)容如下

html代碼:

<!DOCTYPE html>
<html>
<head>
<title>Rotating Banner</title>
<script src="script07.js"></script>
<link rel="stylesheet" href="script01.css" rel="external nofollow" >
</head>
<body>
<div class="centered">
<img src="images/reading1.gif" id="adBanner" alt="Ad Banner">
</div>
</body>
</html>

css代碼:

body {
background-color: white;
color: black;
font-size: 20px;
font-family: "Lucida Grande", Verdana,Arial, Helvetica, sans-serif;
}
h1, th {
font-family: Georgia, "Times New Roman",Times, serif;
}
h1 {
font-size: 28px;
}
table {
border-collapse: collapse;
}
th, td {
padding: 10px;
border: 2px #666 solid;
text-align: center;
width: 20%;
}
#free, .pickedBG {
background-color: #f66;
}
.winningBG {
background-image:url(images/redFlash.gif);
}

js代碼:

window.onload = rotate;
var thisAd = 0;
function rotate() {
var adImages = new Array("images/ reading1.gif","images/reading2. gif","images/reading3.gif");
thisAd++;
if (thisAd == adImages.length) {
thisAd = 0;
}
document.getElementById("adBanner").src = adImages[thisAd];
setTimeout(rotate, 3 * 1000);//設(shè)置時(shí)間,本每隔多長(zhǎng)時(shí)間改變廣告條中的GIF
}

在循環(huán)廣告條中添加鏈接:修改js的代碼

window.onload = initBannerLink;
var thisAd = 0;
function initBannerLink() {
if (document.getElementById("adBanner").parentNode.tagName == "A") {
document.getElementById("adBanner").parentNode.onclick = newLocation;
}
rotate();
}
function newLocation() {
var adURL = new Array("negrino.com","sun.com","microsoft.com");
document.location.href = "http://www." + adURL[thisAd];
return false;
}
function rotate() {
var adImages = new Array("images/ reading1.gif","images/reading2. gif","images/reading3.gif");
thisAd++;
if (thisAd == adImages.length) {
thisAd = 0;
}
document.getElementById("adBanner").src = adImages[thisAd];
setTimeout(rotate, 3 * 1000);//設(shè)置時(shí)間,本每隔多長(zhǎng)時(shí)間改變廣告條中的GIF
}

聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

javascript實(shí)現(xiàn)循環(huán)廣告條效果

本文實(shí)例為大家分享了javascript實(shí)現(xiàn)循環(huán)廣告條的具體代碼,供大家參考,具體內(nèi)容如下:html代碼。<;<。DOCTYPE html>;<;html>;<;head>;<;title>;Rotating Banner<;/title>;<;script src="script07.js">;<;/script>;<;link rel="stylesheet" href="script01.css" rel="external nofollow" >;<;/head>;<;body>;<;div class="centered">;<;<;/div>;<;/body>。
推薦度:
  • 熱門(mén)焦點(diǎn)

最新推薦

猜你喜歡

熱門(mén)推薦

專題
Top
主站蜘蛛池模板: 国产精品第5页 | 亚洲另类在线观看 | 欧美精品一二三 | 久久2 | 日韩 亚洲 制服 欧美 综合 | 久久久久国产精品美女毛片 | 欧美一区二区三区视频 | 日韩一级精品久久久久 | 国产成人精品视频在放 | 久久伊人一区二区三区四区 | 久久频道毛片免费不卡片 | 欧美成人一区二区三区 | 日韩一级精品视频在线观看 | 欧美极品第1页专区 | 91久久综合九色综合欧美98 | 国内精品一区二区三区αv 国产最新进精品视频 | 亚洲国产成人久久综合野外 | 久久国产精品高清一区二区三区 | 色综合天天娱乐综合网 | 国产偷亚洲偷欧美偷精品 | 图片一区 | 综合亚洲一区二区三区 | 亚洲欧美日韩在线观看二区 | 国产欧美成人一区二区三区 | 国产精品麻豆a在线播放 | 永久免费毛片 | 亚洲国产成人综合精品2020 | 伊人精品国产 | 国产精品亚洲一区二区三区久久 | 日韩欧美一区二区三区中文精品 | 亚洲色图欧美自拍 | 欧美另类一区 | 91午夜精品亚洲一区二区三区 | 精品国产免费人成在线观看 | 欧洲97色综合成人网 | 国产毛片一级国语版 | 综合精品欧美日韩国产在线 | 欧美干| 久久午夜一区二区 | 精品日韩欧美一区二区三区 | 亚洲综合日韩 |