Why doesn't this javascript script work?
<p>I'm a novice so this is probably very simple, but it isn’t for me.</p>

<pre><code>&lt;div id="abc" style="width:100px; height:100px; background-color:Blue;" onclick="change()"&gt;
  Hi
&lt;/div&gt;
</code></pre>

<p>And here's a script so that clicking on the box <em>should</em> change the text. But doesn't. Why?</p>

<pre><code>function change() 
{
  var text = "abcde";
  var new1 = "";
  var element = document.getElementById('abc');
  for (var i=0;i&lt;text.length;i++)
    {
      new1 = substring(i,text.length-i);
      element.innerHTML = new1;
    }
}
</code></pre>

<p>jsfiddle: <a href="http://jsfiddle.net/wrG3B/" rel="nofollow">here</a>.</p>
