Phiên bản đầy đủ: jsB@nk » Hình ảnh » Hoa cỏ mùa xuân
URL: https://www.javascriptbank.com/flowerpower-index.html
Hiệu ứng mang không khí mùa xuân đến cho trình duyệt với hình ảnh các bông hoa nở rộ khắp nơi.
Phiên bản đầy đủ: jsB@nk » Hình ảnh » Hoa cỏ mùa xuân
URL: https://www.javascriptbank.com/flowerpower-index.html
<script>// CREDITS:// FlowerPower: put springtime on your website// by Urs Dudli and Peter Gehrig // Copyright (c) 2001 Peter Gehrig and Urs Dudli. All rights reserved.// number of blossomsvar numberofblossoms=10// speed of blossom animation (higher means slower)var openblossomspeed=200// how long shall the blossom be visible after being opened? Answer in secondsvar showblossomstime=2// do not edit the variables belowvar frame=new Array()frame[0]=new Image()frame[0].src="frame1.gif"frame[1]=new Image()frame[1].src="frame2.gif"frame[2]=new Image()frame[2].src="frame3.gif"frame[3]=new Image()frame[3].src="frame4.gif"frame[4]=new Image()frame[4].src="frame5.gif"frame[5]=new Image()frame[5].src="frame6.gif"var i_nownumberofframes=0var i_maxnumberofframes=5var i_numberofblossoms=0var marginleft=0var margintop=0var marginbottomvar marginrightvar timervar thisblossomshowblossomstime=showblossomstime*1000function positionblossoms() {if (document.all) { marginbottom=document.body.clientHeight-40 marginright=document.body.clientWidth-40 for (i=0;i<=numberofblossoms;i++) { var randx=Math.floor(marginright*Math.random())var randy=Math.floor(marginbottom*Math.random())thisblossom=eval("document.all.blossom"+i+".style")thisblossom.posLeft=randxthisblossom.posTop=randythisblossom.visibility="visible"}thisblossom=eval("blossom0")openblossoms()}if (document.layers) { marginbottom=window.innerHeight-40 marginright=window.innerWidth-40 for (i=0;i<=numberofblossoms;i++) { var randx=Math.floor(marginright*Math.random())var randy=Math.floor(marginbottom*Math.random())thisblossom=eval("document.blossom"+i)thisblossom.left=randxthisblossom.top=randythisblossom.visibility="visible"}thisblossom=eval("document.blossom0.document")openblossoms()}}function openblossoms() {if (document.all) {clearTimeout(timer)if (i_nownumberofframes<=i_maxnumberofframes) {thisblossom.innerHTML="<img src='"+frame[i_nownumberofframes].src+"'>"i_nownumberofframes++timer=setTimeout("openblossoms()",openblossomspeed)}else {clearTimeout(timer)i_nownumberofframes=0switchtonextblossom()}}if (document.layers) { if (i_nownumberofframes<=i_maxnumberofframes) {thisblossom.write("<img src='"+frame[i_nownumberofframes].src+"'>")thisblossom.close()i_nownumberofframes++timer=setTimeout("openblossoms()",openblossomspeed)}else {clearTimeout(timer)i_nownumberofframes=0switchtonextblossom()}}}function switchtonextblossom() {if (document.all) {i_numberofblossoms++if (i_numberofblossoms<=numberofblossoms) {thisblossom=eval("blossom"+i_numberofblossoms)openblossoms()}else {setTimeout("hideblossoms()",showblossomstime)}}if (document.layers) {i_numberofblossoms++if (i_numberofblossoms<=numberofblossoms) {thisblossom=eval("document.blossom"+i_numberofblossoms+".document")openblossoms()}else {setTimeout("hideblossoms()",showblossomstime)}}}function hideblossoms() {if (document.all) {for (i=0;i<=numberofblossoms;i++) { thisblossom=eval("document.all.blossom"+i+".style")thisblossom.visibility="hidden"}}if (document.layers) {for (i=0;i<=numberofblossoms;i++) { thisblossom=eval("document.blossom"+i)thisblossom.visibility="hidden"}}}if (document.all) {for (i=0;i<=numberofblossoms;i++) {document.write("<div id='blossom"+i+"' style='position:absolute;top:0px;left:0px;visibility:hidden;'><img name='blossomimg"+i+"' src='frame1.gif'></div>")document.clear()}}if (document.layers) {for (i=0;i<=numberofblossoms;i++) {document.write("<layer name='blossom"+i+"' visibility=hide><img name='blossomimg"+i+"' src='frame1.gif'></layer>")}}window.onresize=positionblossomswindow.onload=positionblossoms</script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
http://javascriptbank.com/javascript/image/FlowerPower/frame1.gifhttp://javascriptbank.com/javascript/image/FlowerPower/frame2.gifhttp://javascriptbank.com/javascript/image/FlowerPower/frame3.gifhttp://javascriptbank.com/javascript/image/FlowerPower/frame4.gifhttp://javascriptbank.com/javascript/image/FlowerPower/frame5.gifhttp://javascriptbank.com/javascript/image/FlowerPower/frame6.gif