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>

  • 相关阅读:
    利用Sentinel实现Redis主从切换
    Docker应用一:docker介绍
    利用RAP搭建可视化接口管理平台
    Lucene初步搜索
    Lucene索引的初步创建
    kettle不能正常自动获取字段
    配置hive元数据库mysql时候出现 Unable to find the JDBC database jar on host : master
    Lost connection to MySQL server at ‘reading initial communication packet', system error: 0 mysql远程连接问题
    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)解决方法
    Sqoop import加载HBase案例详解
  • 原文地址:https://www.cnblogs.com/zwei1121/p/1568576.html
Copyright © 2011-2022 走看看