JavaScript 瀏覽器放大縮小
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JavaScript 瀏覽器放大縮小</title>
</head>
<script>
var i = 1.0;
function big(){
document.body.style.zoom = i + 0.2;
document.body.style.cssText += '; -moz-transform: scale(' + i + ');-moz-transform-origin: 0 0; '; //火狐
i+=0.2;
}
function small(){
document.body.style.zoom = i - 0.2;
document.body.style.cssText += '; -moz-transform: scale(' + i + ');-moz-transform-origin: 0 0;'; //火狐
i -= 0.2;
}
</script>
<body>
<a href="#" onclick="big()">放大</a>
<a href="#" onclick="small()">縮小</a>
</body>
</html>
參考或是複製語法時,別忘了留個言喔 ^ ^ ~