Skip to content
Advertisement

Javascript how to change font properties to script?

I found this script which is perfect for what I need. However I would like to change the font properties to make it bold and red for the result displayed. I looked all over and tried adding it but somehow I just seem to make it not function at all when I do. Any help is greatly appreciated. Here is my script.

JavaScript

Advertisement

Answer

Use setAttribute to this element in DOM tree:

JavaScript
Advertisement