Window:print() 方法
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2023年6月.
開啟列印對話框以列印目前的文件。
若呼叫此函式時文件仍在載入中,則文件將在開啟列印對話框前完成載入。
當列印對話框開啟時,此方法將會阻塞。
語法
js
print()
參數
無。
回傳值
無(undefined)。
規範
| Specification |
|---|
| HTML> # printing> |
瀏覽器相容性
參見
- 列印
beforeprint事件afterprint事件