跳转到主要内容

Document: clear() method

{{APIRef("DOM")}}

The Document.clear() method does nothing, but doesn't raise any error.

Syntax

clear()

Parameters

None.

Return value

None ({{jsxref("undefined")}}).

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}