第三种方法: 只有增加 减小 两种方法,不过很实用,本站也是用的这种方法 //更改字体大小 var status0=''; var curfontsize=10; var curlineheight=18; function turnsmall(){ if(curfontsize>10){ document.getElementById('art_content').style.fontSize=(--curfontsize)+'pt'; document.getElementById('art_content').style.lineHeight=(--curlineheight)+'pt'; } } function turnbig(){ if(curfontsize<28){ document.getElementById('art_content').style.fontSize=(++curfontsize)+'pt'; document.getElementById('art_content').style.lineHeight=(++curlineheight)+'pt'; } } script> 字体:[增加 减小] 脚本之家 测试文本代码 [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]