现在网页上的字体是越来越小,别说是视力欠佳者就是好眼睛看久了也疼的难受,在此转载下面这段小脚本,建议网页制作人能够加到网页代码的< head>中,以方便弱视人群放大浏览(仅适用于IE浏览器)!
< 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>