|
Cole
dentro da tag <body>....</body>
<SCRIPT
language=JavaScript>
//copyright
inoue kengo
//num1‚(c)‚num2‚Š‚̐”’
l‚ƒ‰ƒ“ƒ_ƒ€‚•
‚”—pŠ”
function
rangeRandom(num1,num2) {
if((num1
- num2) > 0) {
var
big = num1
var
small = num2
}
else {
var
big = num2
var
small = num1
}
var
range = big - small + 1
var
number = Math.floor(Math.random()*range) + small
return(number)
}
//16i”•Š—p‚Š”
function
toHex(dec) {
hexChar="0123456789ABCDEF"
var
i = dec % 16
var
j = (dec - i)/16
result
= hexChar.charAt(j)
result
+= hexChar.charAt(i)
return
result
}
//ƒ‰ƒ“ƒ_ƒ€
‚•Žš
F(#RRGGBB•\‹L)‚•‚
Š”(Šg’”)
//F‚•‰‚‚‚ˆ
”color‚redAgreenAblueAyellowApinkAwaterAmono‚
Žw’‚‚‚
function
randomColor(color) {
var
textcolor = "#"
//red‚̏‡
if(color=="red")
{
textcolor="ff"
var
tmp = toHex(rangeRandom(0,255))
textcolor
+= tmp
textcolor
+= tmp
}
//green‚̏‡
else
if(color == "green") {
var
tmp = toHex(rangeRandom(0,255))
textcolor
+= tmp
textcolor
+= "ff"
textcolor
+= tmp
}
//blue‚̏‡
else
if(color == "blue") {
var
tmp = toHex(rangeRandom(0,255))
textcolor
+= tmp
textcolor
+= tmp
textcolor
+= "ff"
}
//yellow‚̏‡
else
if(color == "yellow") {
textcolor
+= "ffff"
textcolor
+= toHex(rangeRandom(0,255))
}
//pink‚̏‡
else
if(color == "pink") {
textcolor
+= "ff"
textcolor
+= toHex(rangeRandom(0,255))
textcolor
+= "ff"
}
//water‚̏‡
else
if(color == "water") {
textcolor
+= toHex(rangeRandom(0,255))
textcolor
+= "ffff"
}
//mono‚̏‡
else
if(color == "mono") {
var
tmp = toHex(rangeRandom(0,255))
textcolor
+= tmp + tmp + tmp
}
//ˆȏˆŠO‚̏‡
else
{
for(var
i = 0 ; i < 3 ; i++) {
textcolor
+= toHex(rangeRandom(0,255))
}
}
return
textcolor
}
function
randomText(txt,color) {
var
str = ""
for(var
i = 0 ; i < txt.length ; i++) {
str
+= "<FONT COLOR='"
str
+= randomColor(color) + "'>"
str
+= txt.substring(i,i+1)
str
+= "</FONT>"
}
return
str
}
var
msg = "Ol para todos...beijo maria lucia !"
function
chStr() {
clearTimeout(timerID)
var
tmp_msg = msg
msg
= prompt("•Žš‚
“—‚‚‚‚3/4‚‚",msg)
if((msg
== null)||(msg == "")) {
msg
= tmp_msg
}
makeRainbow()
}
function
makeRainbow() {
for(i=0
; i<form1.length ; i++) {
if(form1.elements[i].checked)
{
var
color_value = form1.elements[i].value
}
}
var
str = randomText(msg,color_value)
moji.innerHTML
= str
timerID
= setTimeout("makeRainbow()",100)
}
</SCRIPT>
<META
content="MSHTML 5.50.4134.100" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY
text=white bgColor=#c0c0c0
background=cid:016201c2f721$6c7fee20$45e9b3c8@rjo.virtua.com.br
onload=makeRainbow()>
<DIV><FONT
face="Comic Sans MS" color=#000000 size=2></FONT> </DIV><BGSOUND
balance=0
src="cid:016301c2f721$6c7fee20$45e9b3c8@rjo.virtua.com.br"
volume=0
loop=infinite>
<DIV> </DIV>
<DIV><STRONG><FONT
face=Tahoma color=#000000 size=2></FONT></STRONG> </DIV>
<DIV><FONT
face=Arial color=#000000></FONT><BR> </DIV>
<DIV
id=moji
style="FONT-SIZE:
50pt; CURSOR: hand; FONT-FAMILY: Fantasy; TEXT-ALIGN: center"
onclick=chStr()></DIV>
<FORM
id=form1 style="TEXT-ALIGN: center">
<DIV
align=center>
<HR>
</DIV>
<DIV><FONT
color=#000080><INPUT type=radio CHECKED value=""
name=colorgroup>all
<INPUT
type=radio value=red name=colorgroup>red <INPUT type=radio
value=green
name=colorgroup>green
<INPUT type=radio value=blue name=colorgroup>blue <INPUT
type=radio
value=yellow name=colorgroup>yellow <INPUT type=radio value=water
name=colorgroup>water
<INPUT type=radio value=mono name=colorgroup>mono
<BR></FONT></DIV></FORM><BR>
|