Hello, i need a code that changes a specific text like: "bye" to the color green. so anytime i use the word BYE in my script, that it appears in the color green without using anytime the code: "font-color"! Thanks!
If you mean you want to simply add some JavaScript to an existing HTML page and have it scan the content for specific words or phrases and then change the color of the text, I would recommend using a server-side tool like Perl or PHP instead. While it would be possible to do this with JavaScript, it would be cumbersome to write the code, probably very slow, and a bit startling to users when they see the changes flow through the page. Perl and PHP both have better ways of scanning HTML and since the processing is done before the HTML is sent to the user's browser, there's no visible changes to the page after it loads. Good luck!