Global It Leader!!



 
 

CSS 글자크기 조절 참고 소스

페이지 정보

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

댓글목록

등록된 댓글이 없습니다.

전체 440
게시물 검색
컴퓨터언어 목록
번호 제목 글쓴이 조회 날짜
340 PHP no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4258 11-11
339 HTML no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6299 09-20
338 모바일 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5213 08-13
337 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4769 08-13
336 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4407 08-04
335 Mysql no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5033 07-31
334 그누보드스킨 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5441 07-22
333 그누보드스킨 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4377 07-21
332 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4753 07-17
331 PHP no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4538 07-01
330 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4381 06-30
329 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9544 06-16
328 HTML no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4166 06-11
열람중 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4078 06-10
326 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4064 06-09
325 CSS no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4188 06-05
324 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4311 06-04
323 HTML no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4670 06-04
322 PHP no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5243 05-21
321 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5069 05-20