Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/03/2002, 15:21
mofo!
 
Fecha de Ingreso: julio-2001
Mensajes: 185
Antigüedad: 23 años, 10 meses
Puntos: 0
Re: Un reto: Bucle para mostrar colores

Basandome en un codigo Javascript de desarrolloweb.com donde muestran como hacer una hice este:

<html>
<head>
<title>Paleta de Colores</title>
</head>
<body bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
<table width="30" border="0" cellspacing="2" cellpadding="0" border="0">
<%
rojo = array("00","33","66" ,"99","CC","FF")
verde = array("00","33","66" ,"99","CC","FF")
azul = array("00","33","66" ,"99","CC","FF")
irojo = 0
iverde = 0
iazul = 0
color = 0
cuantos = 12

for each irojo in rojo
for each iverde in verde
for each iazul in azul
color = irojo & iverde & iazul

if cuantos - 12 = 0 then
cuantos = 0 %><tr><% end if %>
<td bgcolor="#<% =color %>" width="30" height="15" >
<a href="colores.asp?color=<% =color %>" target="_parent"><img src="../img/trans.gif" width="30" height="15" border="0"></a>
</td>
<% if cuantos - 12 = 0 then
cuantos = 0 %><tr><% end if
cuantos = cuantos + 1
next
next
next
%>
</table>
</body>
</html>


Espero te sirva