728x90
<script language="javascript">
function fnFontScale (windowWidth, fontSize, fontUnit) {
 if (typeof oFont == 'undefined'){
  oFont = new Object;
  oFont.windowWidth = parseInt(windowWidth);
  oFont.fontSize = parseInt(fontSize);
  oFont.fontUnit = fontUnit;
 }
 var screenWidth = document.body.offsetWidth;
 var scaledFont = oFont.fontSize * (screenWidth / oFont.windowWidth);
 document.body.style.fontSize = scaledFont + oFont.fontUnit;
}
window.onresize = fnFontScale;
</script>
728x90

'Developer > JavaScript' 카테고리의 다른 글

문서 내 모든 링크의 아래 점선 없애기  (0) 2007.05.03
페이지 직접생성 팝업  (0) 2007.05.03
자바스트립트 객체  (0) 2007.05.02

+ Recent posts