»
AnglaisFranaisVietnamien

Imprimer - Color Bar - JavaScriptBank.com

Version complte: jsB@nk » Divers » Color Bar
URL: http://www.javascriptbank.com/color-bar.html

Color Bar © JavaScriptBank.comL'utilisation d'un mélange de JavaScript et CSS, un mode table avec des cellules qui changent de couleurs peuvent être ajoutés à n'importe quel page web. Il utilise document.write(); Assurez-vous donc à l'intégrer dans un tableau.

Version complte: jsB@nk » Divers » Color Bar
URL: http://www.javascriptbank.com/color-bar.html



CSS
<STYLE>.1 {BACKGROUND-COLOR: lightblue}.2 {BACKGROUND-COLOR: cyan}.3 {BACKGROUND-COLOR: blue}.4 {BACKGROUND-COLOR: darkblue}.5 {BACKGROUND-COLOR: black}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=javascript>var CELLS = 75;function DrawBar() {document.write('<center><table id="theTable" border=1 cellpadding=0 bordercolor=black cellspacing=0 width=50% height=15></center><tr>');for (i=0; i<=CELLS; i++) {document.write('<td></td>');}document.write('</tr></table>');colors('theTable');}function colors(id) {var table = document.getElementById(id);   var rows = table.getElementsByTagName("td");   for(i = 0; i <= CELLS; i++){rnum = Math.floor(Math.random() * 5 + 1);rows[i].className = rnum;}setTimeout("colors('theTable')", 250);}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<SCRIPT>DrawBar();</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->