alertHTML(document.body); function alertHTML(context) { var nodes = context.childNodes, i = nodes.length; while (i--) alert(nodes[i]); }