hi, all
I have a very simple js code and want to change some text font to bold. The
code like this:
<script language="javascript">
function DivOnClick(obj)
{
obj.style.fontweight="bold"; //This does not work. It does nothing.
}
</script>
<DIV id="div1" onclick="DivOnClick(this)" style="color:red">simple
example</DIV>
....
I don't know what's wrong!
bruce barker - 16 Mar 2005 19:35 GMT
javascript is case sensitive, try:
<DIV id="div1" onclick="this.style.fontWeight='bold';" style="color:red">
simple example
</DIV>
-- bruce (sqlwork.com)
| hi, all
| I have a very simple js code and want to change some text font to bold. The
[quoted text clipped - 10 lines]
| ....
| I don't know what's wrong!