• JS对img进行操作


       <script type="text/javascript">
            var i = 1; var n;
            function showImg() {

                if (document.getElementById('img').getAttribute("src") == "images/1.jpg") {
                    document.getElementById('img').setAttribute("src","images/2.jpg");
                }
                else {
                     document.getElementById('img').setAttribute("src","images/1.jpg");
                }
            }

            function showImg1() {
                document.getElementById('img').setAttribute("src", "images/" + i + ".jpg"); i++;
                if (i > 10)
                {
                    i = 1;
                }
            }


            function show() {
              n=setInterval(showImg1, 500);
            }

            function show1() {
                clearInterval(n);
            }
        </script>

    </head>
    <body>
        <img id="img" alt="" src="images/1.jpg" width="200" height="200" />
        <input id="Button1" type="button" value="换图片" onclick="showImg()" />
        <input id="Button2" type="button" value="切图" onclick="showImg1()" />
        <input id="Button3" type="button" value="轮换" onclick="show()" />
            <input id="Button4" type="button" value="停止轮换" onclick="show1()" />

    </body>
    </html>

  • 相关阅读:
    v$db_object_cache
    选出有行连接(row chain)或者是行迁移(row migeration)的表
    选出需要rebuild的索引
    bitmap index
    log4j使用简介
    找出需要分析的表以及delete超过阀值(你设定)的表
    10Android Wifi 移植配置
    9 Android WIFI 驱动移植
    10Android Wifi 移植配置
    7framework详解
  • 原文地址:https://www.cnblogs.com/xinyuyuanm/p/3024895.html
Copyright © 2020-2023  润新知