使用 JavaScript 缩放页面

Zoom the page using JavaScript

如何使用 JavaScript 缩放 in/out 页面?

=请评论解释代码=

试试这个

function ajustaZoom() {
        document.body.style.zoom = "67%" 
    }
function ZoomIn()
{
    var Page = document.getElementById('Body');
    var zoom = parseInt(Page.style.zoom) + 50 +'%'
    Page.style.zoom = zoom;
    return false;
}

function ZoomOut()
{
    var Page = document.getElementById('Body');
    var zoom = parseInt(Page.style.zoom) - 50 +'%'
    Page.style.zoom = zoom;
    return false;
}