此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。

View in English Always switch to English

Window:print() 方法

Baseline 2023
Newly available

Since ⁨June 2023⁩, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

開啟列印對話框以列印目前的文件。

若呼叫此函式時文件仍在載入中,則文件將在開啟列印對話框前完成載入。

當列印對話框開啟時,此方法將會阻塞。

語法

js
print()

參數

無。

回傳值

無(undefined)。

規範

Specification
HTML
# printing

瀏覽器相容性

參見