change text color using javascript code example
Example 1: js element text color
element.style.color = '#f0f';
Example 2: javascript change color
var span = document.getElementsByTagName("span")[0];
span.style.color = "red";
element.style.color = '#f0f';
var span = document.getElementsByTagName("span")[0];
span.style.color = "red";