Newer
Older
jstrr / change2.js
@ItoRino ItoRino on 28 Sep 2022 428 bytes js
i = 0;              //背景画像保存先
                        //配列を作成
img = new Array("jstrr2.png","jstrr3.png");
function change(){                //背景画像を変える
    i++;
    if(i >= img.length) {
        i = 0;
    }
    document.body.background = img[i];
}
function tm(){                    //タイマーをセット
    document.body.background = img[i];
    tm = setInterval("change()",5000);
}