惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
D
Docker
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
F
Full Disclosure
H
Hackread – Cybersecurity News, Data Breaches, AI and More
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
L
LangChain Blog
H
Help Net Security
B
Blog
T
Tailwind CSS Blog
V
V2EX
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
Recent Announcements
Recent Announcements
aimingoo的专栏
aimingoo的专栏
美团技术团队
A
About on SuperTechFans
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
I
InfoQ
Project Zero
Project Zero
I
Intezer
Google DeepMind News
Google DeepMind News
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI
C
Cyber Attacks, Cyber Crime and Cyber Security
G
GRAHAM CLULEY
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
S
Securelist
Recorded Future
Recorded Future
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - 叶小钗
S
Security Affairs
Blog — PlanetScale
Blog — PlanetScale
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
The Hacker News
The Hacker News

博客园 - 周奇

程序员大杯具:蜗居中的小贝是搞C++的 APS.NET获取用户端真实IP - 周奇 - 博客园 获取Repeater中TextBox中的值 - 周奇 - 博客园 Repeater 实现批量,删除.全选.分页 - 周奇 - 博客园 Repeater 实现删除 - 周奇 - 博客园 Google和百度收录网站页面的比较 设为首页代码大全 - 周奇 - 博客园 asp.net不刷新显示隐藏的办法(心得) - 周奇 - 博客园 统计网页访问量的JAVA Script代码 - 周奇 - 博客园 解决IE6、IE7、Firefox兼容最简单的CSS Hack 过滤html(转) - 周奇 - 博客园 联合查询 sql语句的联合查询(join 用法) 功能超多的JS验证表单大全 Repeater 删除 记录 功能 实现 链接数据库超时 向google,baidu,yahoo,msn,sogou等搜索引擎提交网站 娶个女程序员的好处 最简单的mp3播放器,只有播放和暂停
Js做的动态Flash - 周奇 - 博客园
周奇 · 2009-07-15 · via 博客园 - 周奇

下面放在js页面

// JScript 文件
// 计时器
var theTimer = null;

var cpAD=new Array();
var cpADlink=new Array();
var cpADmsg=new Array();
var adNum=5;     //定义了5个数组
var coll=0;

cpAD[0]="upimg/shouye/p1.jpg";          //链接图片
cpADlink[0]="";         //链接URL
cpADmsg[0]="Flywe の Blog";        //状态栏提示信息

cpAD[1]="upimg/shouye/p2.jpg";
cpADlink[1]=""
cpADmsg[1]="Flywe の Blog";

cpAD[2]="upimg/shouye/p3.jpg";
cpADlink[2]="";
cpADmsg[2]="Flywe の Blog";


var preloadedimages=new Array();
for (i=1;i<cpAD.length;i++){
preloadedimages[i]=new Image();
preloadedimages[i].src=cpAD[i];
}

//跳转的URL地址
function jump2url()
{
jumpUrl=cpADlink[adNum];
jumpTarget='_blank';
if (jumpUrl != '')
{
    if (jumpTarget != '')
        window.open(jumpUrl,jumpTarget);
    else location.href=jumpUrl;
    }
}

//图片变化的函数
function changeimg(n)
{
    adNum=n;
    switch(adNum)
    {
    case 0:
    {
//        window.img1.src="upimg/1-2.jpg";
//        window.img2.src="upimg/2.jpg";
//        window.img3.src="upimg/3.jpg";
        document.getElementById("img1").src="uping/1-2.jpg";
        document.getElementById("img2").src="uping/2.jpg";
        document.getElementById("img3").src="uping/3.jpg";
        break;
    }
    case 1:
    {
        document.getElementById("img1").src="upimg/1.jpg";
        document.getElementById("img2").src="upimg/2-2.jpg";
        document.getElementById("img3").src="upimg/3.jpg";
        break;
    }
    case 2:
    {
       document.getElementById("img1").src="upimg/1.jpg";
        document.getElementById("img2").src="upimg/2.jpg";
        document.getElementById("img3").src="upimg/3-2.jpg";
        break;
    }
    }
    window.clearInterval(theTimer);
    adNum=adNum-1;
    nextAd();
}
//当点击时直接跳转
function nextAd()
{
 coll++;
 if(coll>1)
 {
  switch(adNum+1)
  {
   case 3:
   {
    document.getElementById("img1").src = "upimg/1-2.jpg";
    document.getElementById("img2").src="upimg/2.jpg";
    document.getElementById("img3").src="upimg/3.jpg";
    break;
   }
     
   case 1:
   {
    document.getElementById("img1").src="upimg/1.jpg";
    document.getElementById("img2").src="upimg/2-2.jpg";
    document.getElementById("img3").src="upimg/3.jpg";
    break;
   }
   case 2:
   {
    document.getElementById("img1").src="upimg/1.jpg";
    document.getElementById("img2").src="upimg/2.jpg";
    document.getElementById("img3").src="upimg/3-2.jpg";
    break;
   }
  }
 }
 if(adNum<cpAD.length-1)adNum++ ;
 else adNum=0;
 setTransition();
 document.getElementById("cpADrush").src=cpAD[adNum];
 playTransition();
 displayStatusMsg();
 //定义了轮换时间 5s
 theTimer=setTimeout("nextAd()", 5000);
}

function setTransition(){
if (document.all){
document.getElementById("cpADrush").filters.revealTrans.Transition=23;
document.getElementById("cpADrush").filters.revealTrans.apply();
}

}
function playTransition(){
if (document.all)
document.getElementById("cpADrush").filters.revealTrans.play()
}
function displayStatusMsg() {
status=cpADmsg[adNum];
document.returnValue = true;
}

下面是aspx页面

<table width="688px" height="304px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td>
                                       
                                            <img style="filter: revealTrans(duration=2,transition=23)" height="304px" width="688px"
                                                border="0" name="cpADrush" alt=""></td>
                                    <script language="JavaScript">nextAd()</script>
                                </tr>
                                <tr>
                                        <table width="100%" name="T1" id="T1" border="0" cellspacing="1" cellpadding="0">
                                            <tr>
                                                <td align="right" style="width: 660px; height: 16px;">
                                                    <!--<img src="../images/furunyisheng2.jpg" width="465" height="16" />-->
                                                </td>
                                                <td style="width: 5px; height: 16px;">
                                                    <a href="javascript:;" onmouseover="changeimg(0)">
                                                        <img name="Image2" id="img1" border="0" src="upimg/1.jpg" onclick="changeimg(0)"></a></td>
                                                <td width="5px" style="height: 16px">
                                                    <a href="javascript:;" onmouseover="changeimg(1)">
                                                        <img name="Image3" id="img2" border="0" src="upimg/2.jpg" onclick="changeimg(1)"></a></td>
                                                <td width="5px" style="height: 16px">
                                                    <a href="javascript:;" onmouseover="changeimg(2)">
                                                        <img name="Image4" id="img3" border="0" src="upimg/3.jpg" onclick="changeimg(2)"></a></td>
                                            </tr>
                                        </table>
                                </tr>
                            </table>