said_fox
11-12-2003, 05:13 PM
Hi,
Suppose the following function:
function colorIt(his)
{
his.style.color="red";
}
it seems to give the element color the red color.
ok.
Now I will place it inside a tag as follows:
<div onMouseover="colorIt(this)">The text to be colored into RED onMouseover</div>
The question is:
What can I add to this function to return the color back onMouseout?
I don't want to use onMouseout event handler inside the div Tag. Also I don't want to write another function.
Is this possible?
Suppose the following function:
function colorIt(his)
{
his.style.color="red";
}
it seems to give the element color the red color.
ok.
Now I will place it inside a tag as follows:
<div onMouseover="colorIt(this)">The text to be colored into RED onMouseover</div>
The question is:
What can I add to this function to return the color back onMouseout?
I don't want to use onMouseout event handler inside the div Tag. Also I don't want to write another function.
Is this possible?