Sometimes, we want to change the browser zoom level with JavaScript.
In this article, we’ll look at how to change the browser zoom level with JavaScript.
How to change the browser zoom level with JavaScript?
To change the browser zoom level with JavaScript, we set the zoom
style.
For instance, we write
document.body.style.zoom = "80%";
to set the zoom
style of the body element to '80%'
to set the zoom of the page to 80%.
Conclusion
To change the browser zoom level with JavaScript, we set the zoom
style.