网页顶部延时图片广告

admin11年前分享1029
网页顶部延时图片广告,直接上代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>脚本之家 www.jb51.net</title>
<script language="javascript" type="text/javascript">
window.onload = function(){
var fudongAD = document.getElementById("headads");
setTimeout("noneheadads()", 3000); //停留时间自己适当调整
}
var height2 = 339; //高度
function noneheadads() {
height2 = height2 - 10;
if (height2 <= 0) {
document.getElementById("headads").style.display = "none";
return;
}
document.getElementById("headads").style.height = height2 + "px";
setTimeout("noneheadads()", 40);
}
</script>
</head>
<body>
<div id="headads" style="margin: 0 auto; overflow:hidden;"><img src="http://files.jb51.net/file_images/photoshop/201101/2011012812333783.jpg" /></div>
</body>
</html>
 
aaaaaaaa

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。