直接码上:
<script type="text/javascript"> function getIframeDOM(id) { return document.getElementById(id).contentDocument || document.frames[id].document; } function setHeight(s) { var bodyfont = getIframeDOM("iframeZW"); var ihei =$("#iframeZW").height(); $("#iframeZW").height(ihei+20); //单位标准化 bodyfont.body.style.height = (parseInt(bodyfont.body.offsetHeight)+20)+"px"; } function setSize(s) { var bodyfont = getIframeDOM("iframeZW"); bodyfont.body.style.fontSize = s+"px"; } </script>