2011-03-08 7 views

回答

0
<script type="text/javascript"> 
function textsizer(e){ 
var evtobj=window.event? event : e //distinguish between IE's explicit event object (window.event) and Firefox's implicit. 
var unicode=evtobj.charCode? evtobj.charCode : evtobj.keyCode 
var actualkey=String.fromCharCode(unicode) 
if (actualkey=="a") 
document.body.style.fontSize="120%" 
if (actualkey=="z") 
document.body.style.fontSize="100%" 
} 
document.onkeypress=textsizer 
</script>