闪光边框,blingbling

<script type="text/javascript">
        var colors=["#5F9EA0","#FFFF00","cornflowerblue","green"];
        var c_index =0;
        var handle;
        var s_index =4;
        function setHM(){
            handle =setInterval(showNowTm,1000);
        }
        function showNowTm(){
            document.getElementById("div2").style.backgroundColor =colors[c_index];
            c_index++;
            if(c_index==4){
                c_index=0;
            }
            if(s_index==0){
                s_index=4;
            }
        }
        function clearMM(){
            window.clearInterval(handle);

</script>
<body>       
            <input type="button" name="btn1" id="btn1" value="冒泡方式" />
            <input type="button" name="btn2" id="btn2" value="blingbling" />

</body>

posted @ 2017-08-24 18:30  kiskistian  阅读(216)  评论(0编辑  收藏  举报