Bilgisayar Bölümü ASP Kod ve Script Arşivi


Random Color Function For Each Character In A String

<%
Function rainbow(strtext)
strhtml = ""
x= 0
y = 1
x = Len(strtext)
Do until y = x + 1
randomize
a = Int((15 - 0 +1) * rnd + 0)
ahex = hex(a)
randomize
b = Int((15 - 0 +1) * rnd + 0)
bhex = hex(b)
hexa = ahex & bhex
randomize
c = Int((15 - 0 +1) * rnd + 0)
chex = hex(c)
randomize
d = Int((15 - 0 +1) * rnd + 0)
dhex = hex(d)
hexb = chex & dhex
randomize
e = Int((15 - 0 +1) * rnd + 0)
ehex = hex(e)
randomize
f = Int((15 - 0 +1) * rnd + 0)
fhex = hex(e)
hexc = ehex & fhex
font = "<font color='#" & hexa & hexb & hexc & "'>"
strhtml = strhtml & font & mid(strtext, y, 1) & "</font>"
y = y + 1
Loop
rainbow = strhtml
End Function
%>

ASP Kitabı

 

Faydalılar: Altın Fiyatları |Hediye Kolye | pırlanta fiyatları
Ana Sayfa  Sık Kullanılanlara Ekle   admin[at]bilgisayarbolumu.com | © 2006 - 2023 Bilgisayarbolumu.com