Javascript change Div style
<p>I want that <code>part 1</code> onclick div style changes and <code>part 2</code> again on click it comes back to normal. I tried doing so but I failed to achieve the <code>part 2</code> results. </p>

<p>Following is the Javascript code</p>

<pre><code>function abc() {
    document.getElementById("test").style.color="red";
}
</code></pre>

<p>After clicking the test div again, color should come back to defaulr color i.e. black...</p>
