Quote:
Originally Posted by alvaritoe
I know that you change color by document.write(fontcolor("red"))
|
document.write() statements must be run before the page finishes loading.
Any document.write() statement that runs after the page finishes loading will create a new page and overwrite all of the content of the current page (including the Javascript which called it). So document.write() is at best really only useful to write the original content of your page.
It cannot be used to update the content of your page after that page has loaded.