[red]<table cellspacing="1">
<%
Dim arrColors, strColorPart1, strColorPart2, strColorPart3, x, y, z
arrColors = array("FF","CC","99","66","33","00")
For x = 0 To 5
strColorPart1 = arrColors(x)
Response.Write vbcrlf &"<tr>"
For y = 0 To 5
strColorPart2 = arrColors(y)
For z = 0 To 5
strColorPart3 = arrColors(z)
Response.Write vbcrlf &"<td style=""width: 10px; background: #"& strColorPart1 & strColorPart2 & strColorPart3 &";"">&nbsp;</td>"
Next
Next
Response.Write vbcrlf &"</tr>"
Next
%>
</table>[/red]
Liten "förbättring". Klicka på färgen och få färgkoden i ett textfält.
<table cellspacing="1">
<%
Dim arrColors, strColorPart1, strColorPart2, strColorPart3, x, y, z
arrColors = array("FF","CC","99","66","33","00")
For x = 0 To 5
strColorPart1 = arrColors(x)
Response.Write vbcrlf &"<tr>"
For y = 0 To 5
strColorPart2 = arrColors(y)
For z = 0 To 5
strColorPart3 = arrColors(z)
Response.Write vbcrlf &"<td onclick=""document.foo.bar.value=this.style.background;"" style=""width: 10px; background: #"& strColorPart1 & strColorPart2 & strColorPart3 &";""> </td>"
Next
Next
Response.Write vbcrlf &"</tr>"
Next
%>
</table>
<form name="foo">
<input type="text" name="bar">
</form>
264 ms totalt · 4 externa anrop · v20260731065814-full.86ec41c2