Change color inline with javascript
<p>Is there a way using javascript and HTML to change the color of a span? For example:</p>

<pre><code>&lt;span onLoad="document.getElementById('test').style.color = 'red';" id="test"&gt;test&lt;/span&gt;
</code></pre>

<p>But that doesn't seem to work.</p>

<p><strong>Quick update:</strong> This is just a precursor to the actual problem that I'm trying to solve. Basically I'm inside a CMS that only allows for in place HTML editing. That means that I don't have access to the head to add custom javascript functions etc. What I'm trying to do is make an inline function that takes the date specified (in a span for example) and then colorizes it based on some <em>in-line</em> js logic.</p>
