object.style=??? -
02-03-2004
, 08:42 PM
I've got a script that can't really use a class definition for a style and
must instead use a style="..." in the div tag. I also need a way to define
an mouseover style for this div. I have a function that works something like
this:
function getDiv(content, styleoff, styleon) {
return '<div style="' + styleoff + '" ' +
'onMouseOver="this.style=\'' + this.styleon + '\';">' +
content + '</div>';
}
It will also need a mouseout to put the initial style back, but I can't get
the style set. I know that there is style.___ = but I don't know what I'm
going to get from the string. Any suggestions? |