Гистограмма построена с использованием свойства images[ ] объекта Document.
<html> <head> <script language="JavaScript"> i=0 function d_rand() { for(j=0;j<10;j++) { for(i=0;i<10;i++) document.images[j+i*10].src = "white.jpg" y= Math.floor(Math.random()*10) for(i=9;i>9-y;i--) document.images[j+i*10].src = "blue.jpg" } } </script> <body bgcolor=ffffff> <center> <table border=0> <tr> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <tr> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <tr> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <tr> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <tr> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <tr> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <tr> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <tr> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <tr> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <tr> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <td><img src="white.jpg" width=20 height=10></td> <tr><td colspan=10><img src="blue.jpg" width=250 height=2></td></tr> </table> <form name=diagram> <input name=random type=button value=click onClick="d_rand()"> </form> </center> </body> </html>