Originally Posted by jmlwebdesign
document.write is baddddd.........
In reference to the OP's code...
What should I use here to show 21
This could be done:
<!-- results will be displayed here -->
var one = document.getElementById('one');
var two = document.getElementById('two');
var three = document.getElementById('three');
var count = 20;
one.innerHTML = 'The initial value of count is: ' + count;
var countNow = count + 1;
two.innerHTML = 'The value of count is now: ' + count;
three.innerHTML = 'The value of countNow is: ' + countNow;
Kinda clumsy, but it clearly shows what is going on as well as showing the proper way to display things (as opposed to "document.write").