<HTMLElement>.empty()

Deletes all the element’s child nodes.

Usage:
HTMLElement = Element.empty()
Member of:
HTMLElement
Parameters:
none
Returns:
The HTMLElement it was called on, thus allowing for command chaining.

Examples

A simple example could look like this:

document.getElementById('foo').empty();

More information