change the color of text in javascript

JavaScript
element.style.color = '#f0f';
Source

Also in JavaScript: