2009-05-27 ノードの子を全て削除する function clearChildNodes(node) { while (node.hasChildNodes()) node.removeChild(node.firstChild); return node; }