I'm a novice so this is probably very simple, but it isn’t for me.
<div id="abc" style="width:100px; height:100px; background-color:Blue;" onclick="change()">
Hi
</div>
And here's a script so that clicking on the box should change the text. But doesn't. Why?
function change()
{
var text = "abcde";
var new1 = "";
var element = document.getElementById('abc');
for (var i=0;i<text.length;i++)
{
new1 = substring(i,text.length-i);
element.innerHTML = new1;
}
}
jsfiddle: here.