Remove Node from DOM
<p>Noob question alert! I am working on a basic clock that updates every second, but its not updating because I get Uncaught Error: NOT_FOUND_ERR: DOM Exception 8. Basically i just need to change the removeChild() at the end of the function to something else, but I don't know what to change it to. I want to remove the <code>&lt;p class="time"&gt;</code> that is being created.</p>

<pre><code>function spitTime() {
    var clock = new Date();
    var hours = clock.getHours();
    var minutes = clock.getMinutes();
    var seconds = clock.getSeconds();

    if (minutes &lt;= 9) {
        minutes = "0" + minutes;
    }

    if (seconds &lt;= 9) {
        seconds = "0" + seconds;
    }

    var displayTime = hours + ":" + minutes + ":" + seconds;
    var newTimeElem = document.createElement("p");
    newTimeElem.className = "time";
    var timeText = document.createTextNode(displayTime);
    newTimeElem.appendChild(timeText);
    document.getElementById("timePlace").appendChild(newTimeElem);
    document.getElementById("timePlace").removeChild();
}
</code></pre>

<p>relevant HTML:</p>

<pre><code>&lt;div class="clock"&gt;
    &lt;span id="timePlace"&gt;&lt;/span&gt;
&lt;/div&gt;
</code></pre>
