»
EnglishFrenchVietnamese

Print - Flashing image border - JavaScriptBank.com

Full version: jsB@nk » Image » Flashing image border
URL: http://www.javascriptbank.com/flashing-image-border.html

Flashing image border © JavaScriptBank.comThe effect make borders of image change color constantly as it's flashing.

Full version: jsB@nk » Image » Flashing image border
URL: http://www.javascriptbank.com/flashing-image-border.html



CSS
<style><!--.flashgroup{border:5px solid green;}.flash{border:5px solid red;}--></style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<script language="JavaScript1.2">//specify color of flashvar flashcolor="yellow"//specify speed (less is faster ie: 50)var speed=150/////No need to edit below here////var curborder=new Array()var increment=0var flashobject=new Array()if (document.all||document.getElementById){while (document.getElementById("flash"+increment)!=null){flashobject[increment]=document.getElementById? document.getElementById("flash"+increment).style : eval("document.all.flash"+increment+".style")curborder[increment]=0increment++}}function flash(which){if (curborder[which]==1){flashobject[which].borderLeftColor=flashcolorflashobject[which].borderBottomColor=flashobject[which].borderRightColor}else if (curborder[which]==2){flashobject[which].borderTopColor=flashcolorflashobject[which].borderLeftColor=flashobject[which].borderBottomColor}else if (curborder[which]==3){flashobject[which].borderRightColor=flashcolorflashobject[which].borderTopColor=flashobject[which].borderLeftColor}else if (curborder[which]==4){flashobject[which].borderBottomColor=flashcolorflashobject[which].borderRightColor=flashobject[which].borderTopColor}if (curborder[which]<=3)curborder[which]++elsecurborder[which]=1}if (document.all||document.getElementById){for (z=0;z<flashobject.length;z++){var temp='setInterval("flash('+z+')",'+speed+')'eval(temp)}}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<a href="http://javascriptbank.com"><img src="logojs.gif" id="flash0" class="flashgroup"><br><a href="http://javascriptbank.com"><img src="photo3.jpg" id="flash1" class="flash"></a></fieldset></center><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->