フィイルター MENU


Source
    <HTML lang="ja"> <HEAD> <TITLE>フィイルター</TITLE> <script> let cnt1 = 1.0; let cnt2 = 1.0; let cnt3 = 1.0; let sw = 0; let chg = 0.02; function dsp1() { let obj = document.getElementById("img1"); obj.style.opacity = cnt1; cnt1 -= chg; if(sw == 1) { let obj3 = document.getElementById("img3"); obj3.style.opacity = cnt3; cnt3 += chg; } let tm1 = setTimeout("dsp1()",100); if(cnt1 <= 0) { clearTimeout(tm1); let tm2 = setTimeout("dsp2()", 2000); sw = 1; } } function dsp2() { let obj2 = document.getElementById("img2"); obj2.style.opacity = cnt2; cnt2 -= chg; let obj = document.getElementById("img1"); obj.style.opacity = cnt1; cnt1 += chg; var tm2 = setTimeout("dsp2()",100); if(cnt2 <= 0) { clearTimeout(tm2); let tm3 = setTimeout("dsp3()", 2000); } } function dsp3() { let obj3 = document.getElementById("img3"); obj3.style.opacity = cnt3; cnt3 -= chg; let obj2 = document.getElementById("img2"); obj2.style.opacity = cnt2; cnt2 += chg; var tm3 = setTimeout("dsp3()",100); if(cnt3 <= 0) { clearTimeout(tm3); let tm1 = setTimeout("dsp1()", 2000); } } </script> </head> <body onload="dsp1()"> <center> <img id="img1" src="G1.gif"> <img id="img2" src="G2.gif"> <img id="img3" src="G3.gif"> </center> </body> </html>