We would like to know how to set text color.
<!DOCTYPE html>
<html>
<head>
</head><!-- w w w. j av a 2 s. c o m-->
<body>
<span id="test">test</span>
<script type='text/javascript'>
var test = document.getElementById('test');
test.style.color = 'red'
</script>
</body>
</html>
The code above is rendered as follows: