CODE:
<script>String.prototype.c=function(color){return '<font color="'+(color||'#ccdddc')+'"> '+this.toString()+' </font>'}</script>
<body>
<hr id=q><!-- или любой др. --><BR>
<script>
document.getElementById('q').E=[2,1];
document.body.innerHTML+=document.getElementById('q').E+' до innerHTML<BR>'.c('#cccccc')
document.body.innerHTML+=document.getElementById('q').E+' после<BR><BR>'.c('#cccccc')
document.getElementById('q').E=0;
document.body.innerHTML+=document.getElementById('q').E+' до innerHTML<BR>'.c('#cccccc')
document.body.innerHTML+=document.getElementById('q').E+' после<BR>'.c('#cccccc')
</script>
<script>String.prototype.c=function(color){return '<font color="'+(color||'#ccdddc')+'"> '+this.toString()+' </font>'}</script>
<body>
<hr id=q><!-- или любой др. --><BR>
<script>
document.getElementById('q').E=[2,1];
document.body.innerHTML+=document.getElementById('q').E+' до innerHTML<BR>'.c('#cccccc')
document.body.innerHTML+=document.getElementById('q').E+' после<BR><BR>'.c('#cccccc')
document.getElementById('q').E=0;
document.body.innerHTML+=document.getElementById('q').E+' до innerHTML<BR>'.c('#cccccc')
document.body.innerHTML+=document.getElementById('q').E+' после<BR>'.c('#cccccc')
</script>
Почему так, что посоветуете.
(В IE: [2,1] undef 0 0)