• 图片切换


     <script type="text/javascript">

            var bannerAD = new Array();
            var bannerADlink = new Array();
            var adNum = 0;


            bannerAD[0] = "/images/golf/flash_ftm.jpg";
            bannerADlink[0] = ""

            bannerAD[1] = "/images/golf/flash_ftm02.jpg";
            bannerADlink[1] = ""


            bannerAD[2] = "/images/golf/golf01.jpg";
            bannerADlink[2] = ""

            bannerAD[3] = "/images/golf/golf02.jpg";
            bannerADlink[3] = "";

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

            function setTransition() {
                if (document.all) {

                    aspnetForm.bannerADrotator.filters.revealTrans.Transition = Math.floor(Math.random() * 23);
                    aspnetForm.bannerADrotator.filters.revealTrans.apply();
                }
            }

            function playTransition() {
                if (document.all)
                    aspnetForm.bannerADrotator.filters.revealTrans.play()
            }

            function nextAd() {

                if (adNum < bannerAD.length - 1) adNum++;
                else adNum = 0;
                setTransition();
                document.images.bannerADrotator.src = bannerAD[adNum];


                playTransition();
                theTimer = setTimeout("nextAd()", 5000);
            }

            function jump2url() {
                jumpUrl = bannerADlink[adNum];
                jumpTarget = '_blank';
                if (jumpUrl != '') {
                    if (jumpTarget != '') window.open(jumpUrl, jumpTarget);
                    else location.href = jumpUrl;
                }
            }
            function displayStatusMsg() {
                status = bannerADlink[adNum];
                document.returnValue = true;
            }
        </script>


        <script type="text/javascript"> Start()</script>
       
        <div id="health_right">
            <img src="http://images.cnblogs.com/golf/flash_ftm.jpg"
                name="bannerADrotator" id=img1 border="0" align="center" style="filter: revealTrans(duration=2,transition=40)" />
        </div>


    <script language="javascript">
            function Pause(obj, iMinSecond) {
                if (window.eventList == null) window.eventList = new Array();
                var ind = -1;
                for (var i = 0; i < window.eventList.length; i++) {
                    if (window.eventList[i] == null) {
                        window.eventList[i] = obj;
                        ind = i;
                        break;
                    }
                }

                if (ind == -1) {
                    ind = window.eventList.length;
                    window.eventList[ind] = obj;
                }
                setTimeout("GoOn(" + ind + ")", iMinSecond);
            }


            function GoOn(ind) {
                var obj = window.eventList[ind];
                window.eventList[ind] = null;
                if (obj.NextStep) obj.NextStep();
                else obj();
            }

            function Start() {
                Pause(this, 1000); //调用暂停函数
                this.NextStep = function() {
                    nextAd();
                }
            } 
        </script>

  • 相关阅读:
    Use Module and Function instead of Class in Python
    以命令行方式使用Desktop版Ubuntu
    python中两种拷贝目录方法的比较
    查找重复文件并删除的工具
    Manage sshd Service on CentOS
    Java多线程间的数据共享
    并发 总结
    MapReduce 过程分析
    java能不能自己写一个类叫java.lang.System/String正确答案
    生产者消费者模式--阻塞队列--LOCK,Condition--线程池
  • 原文地址:https://www.cnblogs.com/zwei1121/p/1568576.html
Copyright © 2020-2023  润新知