alvaritoe
10-07-2012, 03:09 PM
Hello
I have got this result
document.getElementById('rent').innerHTML
which outputs a number alright. However, I d like to be a bit fancier and want to output it red if it is equal to 5 or smaller and green otherwise.
I know that you change color by document.write(fontcolor("red"))
but I dont know how to embed this last document.write etc into the one I have above
I have got this result
document.getElementById('rent').innerHTML
which outputs a number alright. However, I d like to be a bit fancier and want to output it red if it is equal to 5 or smaller and green otherwise.
I know that you change color by document.write(fontcolor("red"))
but I dont know how to embed this last document.write etc into the one I have above