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> |
瀏覽器相容性
Loading…
參見
- 列印
beforeprint
事件afterprint
事件