Global It Leader!!



 
 

CSS 글자크기 조절 참고 소스

페이지 정보

작성자 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 4,075회 작성일 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>

댓글목록

등록된 댓글이 없습니다.

전체 48
게시물 검색
컴퓨터언어 목록
번호 제목 글쓴이 조회 날짜
28 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3707 10-17
27 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3964 12-25
26 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4379 06-30
열람중 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4076 06-10
24 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4062 06-09
23 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4186 06-05
22 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5529 05-20
21 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4634 05-20
20 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4130 05-14
19 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4114 04-27
18 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4038 02-04
17 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4871 09-06
16 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4391 01-28
15 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4576 01-21
14 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4412 01-21
13 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4384 12-23
12 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4839 08-19
11 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4618 03-08
10 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4640 02-08
9 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5239 04-17