As to "javascript" in the onClick attribute, it is habit. I don't know what the standards dictate.

The page I posted should remove "1", and then "2" which is the new number 1, and it shouldn't do any more. It should never remove "0".

The code you posted will not work in all browsers. "document.all" is not part of the DOM as far as I know. Admittedly the code I posted will not work in all browsers, but that is because not all browsers are up to date with the specs.