zoukankan      html  css  js  c++  java
  • 图片切换

     <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>

  • 相关阅读:
    HTML图片轮播
    HTML横向二级导航
    HTML 5的革新——语义化标签
    Git撤销修改
    git add -A 和 git add . 的区别
    git reset HEAD 与 git reset --hard HEAD的区别
    Git 工作区、暂存区和版本库
    Python笔记 #21# DHNN
    算法导论(第三版)练习 6.1-1 ~ 6.1-7
    算法导论(第三版)练习 4.1-1 ~ 4.1-5
  • 原文地址:https://www.cnblogs.com/zwei1121/p/1568576.html
Copyright © 2011-2022 走看看