网站制作学习网JS脚本→正文:双图片渐隐渐显广告代码
字体:

双图片渐隐渐显广告代码

JS脚本 2011/1/17 14:17:32  点击:不统计

原文是网站制作学习网的FoAsP.cn
<!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>双图片渐隐渐显广告代码</title>
</head>
<script language=javascript src="/js/jquery-1.4.4.min.js"></script>
<script language="javascript">
<!--
$(function(){
   setInterval("ad_man()",3000);
});
function ad_man(){
var man1 = document.getElementById("man1");
var man2 = document.getElementById("man2");
if(man1.style.display=="block"){
 ad_man_(man1);
 man1.style.display="none";
 man2.style.display="block";
 ad_man_(man2);
}else{
 ad_man_(man2);
 man2.style.display="none";
 man1.style.display="block";
 ad_man_(man1);
}
}
function ad_man_(obj){
with(obj){
      if(obj.filters)filters.blendTrans.apply();
      style.visibility=style.visibility=='hidden'?'':'hidden';
      if(obj.filters)filters.blendTrans.play();
     }
}
-->
</script>
<body>
<div id="man1" style="filter:blendTrans(duration=1); display:block;">
<img src="ad/index_ad2.jpg"  border="0" /></div>
<div id="man2" style="filter:blendTrans(duration=1);display:none; visibility:hidden;">
<img src="ad/index_ad1.jpg"  border="0" /></div>
</div>
</body>
</html>

原载于:文章来源:www.forasp.cn网站制作学习

·上一篇:获取文章中的图片img并做点击跳转 >>    ·下一篇:jquery仿163下拉广告 >>
推荐文章
最新文章