|
| JAVASCRIPT fontcolor() METHOD
In javascript, the fontcolor() method displays text in the specified color ie. as if it were in a <font> element with a color attribute.
The general format is:
string.fontcolor(color);
Color can either be in the compliant color name, rgb or hex format.
Example:
<script type="text/javascript">
var text="Good Morning John";
document.write(text.fontcolor("yellow"));
</script>
The above will output:
See Also:
|
|