웹프로그래밍

Global It Leader!!


CSS


 
 

글자크기 조절 참고 소스

페이지 정보

작성자 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 3,133회 작성일 15-06-10 18:51

본문

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus?">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
  <script>
  /* 글자확대축소 */ 
var currentFontSize = 1;

function zoomUtil(state, e){
 var idx;
 var arrFontSize = new Array();
 
 /*arrFontSize[0] = "xx-small";
 arrFontSize[1] = "x-small";
 arrFontSize[2] = "small";
 arrFontSize[3] = "medium";
 arrFontSize[4] = "large";
 arrFontSize[5] = "x-large";
 arrFontSize[6] = "xx-large";
 */

 arrFontSize[0] = "65%";
 arrFontSize[1] = "75%";
 arrFontSize[2] = "85%";
 arrFontSize[3] = "100%";
 arrFontSize[4] = "110%";
 arrFontSize[5] = "120%";
 arrFontSize[6] = "130%";
 
 if (isAccess(e)) {
  if (state == "plus") {  
      
   if (currentFontSize < 6 ) {
    idx = currentFontSize + 1;
    currentFontSize = idx;
   }else{
    idx = 6;
    currentFontSize = idx;
   }   
  
  } else if (state == "default") {
   idx = 1;
   currentFontSize = idx;
  
  } else if (state == "minus") {   
   
   if ( currentFontSize >= 1) {
    idx = currentFontSize - 1;
    currentFontSize = idx;
   }else{
    idx = 0;
    currentFontSize = idx;
   }
   
  }  
 }
 
 document.body.style.fontSize = arrFontSize[idx];
 
 return false; 
}
function isAccess(e) {
 
 var keynum;
 var ismouseClick = 1;
 
 if (window.event) {  //IE & Safari
  keynum = e.keyCode;
  
  //Safari의 경우 마우스클릭은 keynum 0 이 넘어옴
  if (event.button == 0 || keynum == 0){
   ismouseClick = 0;
  }  
  
 } else if ( e.which ){  // Netscape/Firefox/Opera
  keynum = e.which;
  
  if (keynum == 1) {
   ismouseClick = 0;
  }  
  
 }
 
 //마우스 클릭이거나 엔터키를 누른경우 true값 반환
 if ( ismouseClick == 0 || keynum == 13 ) {
  return true;
 } else {
  return false;
 }
}
</script>
 </head>
 <body>
   <ul class="quick_util">
  <li><a href="#zoom" onclick="zoomUtil('plus',event)">
  <img src="http://go.hanyangcyber.ac.kr/EntHP/200701/images/common/btn_zoom.gif" alt="확대" /></a></li>
  <li><a href="#small" onclick="zoomUtil('minus',event)">
  <img src="http://go.hanyangcyber.ac.kr/EntHP/200701/images/common/btn_small.gif" alt="축소" /></a></li>
  <li><a href="#print" onclick="content_print()">
  <img src="http://go.hanyangcyber.ac.kr/EntHP/200701/images/common/btn_print.gif" alt="인쇄" /></a></li>
 </ul>
 가나다라
 </body>
</html>

댓글목록

등록된 댓글이 없습니다.

전체 72
게시물 검색
CSS 목록
번호 제목 글쓴이 조회 날짜
32 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3124 03-02
31 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3091 11-10
30 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3082 10-26
29 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3505 10-26
28 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2946 10-17
27 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2992 12-25
26 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3473 06-30
열람중 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3134 06-10
24 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3260 06-09
23 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3182 06-05
22 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4615 05-20
21 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3693 05-20
20 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3170 05-14
19 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3312 04-27
18 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3213 02-04
17 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3809 09-06
16 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3482 01-28
15 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3895 01-21
14 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3578 01-21
13 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3707 12-23