字体的缩放
<html>
<head>
<script language="javascript">
var i=0;
document.onkeydown = zoom;
function zoom(){
var IEKey = event.keyCode;
if (IEKey == 76) {
i++;
document.body.style.zoom=1+i/10;
}
if (IEKey == 83) {
i--;
document.body.style.zoom=1+i/10;
}
if (IEKey == 82) {
document.body.style.zoom=1;
i=1;
}
}
</script>
</head>
<body>
按L键放大网页,按S键缩小,按R键恢复正常显示!您可以自己定义不同的按键来达到效果.
</body>
</html>
<head>
<script language="javascript">
var i=0;
document.onkeydown = zoom;
function zoom(){
var IEKey = event.keyCode;
if (IEKey == 76) {
i++;
document.body.style.zoom=1+i/10;
}
if (IEKey == 83) {
i--;
document.body.style.zoom=1+i/10;
}
if (IEKey == 82) {
document.body.style.zoom=1;
i=1;
}
}
</script>
</head>
<body>
按L键放大网页,按S键缩小,按R键恢复正常显示!您可以自己定义不同的按键来达到效果.
</body>
</html>
[此贴子已经被作者于2006-2-13 17:03:19编辑过]