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

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

博客园 - 周奇

程序员大杯具:蜗居中的小贝是搞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>