달력

42024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

'javascript'에 해당되는 글 3건

  1. 2015.09.18 JAVASCRIPT OFFSET(TOP,LEFT)
  2. 2015.07.31 JAVASCRIPT 한글 유니코드 변경
  3. 2015.06.02 javascript 쿠키 셋팅,추출
function getOffset( el ) {
     var _x = 0;
     var _y = 0;
     while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) {
         _x += el.offsetLeft - el.scrollLeft;
         _y += el.offsetTop - el.scrollTop;
         el = el.offsetParent;
     }
     return { top: _y, left: _x };
 }

 

 

var x = getOffset( document.getElementById('div_newPrintCount_' + listIdx) ).left;

Posted by 타카스 류지
|
한글 -> 유니코드 결과 :

유니코드 -> 한글   결과 :

 

 

unicode.html

 

Posted by 타카스 류지
|
/*쿠키세팅*/
function setCookie(name,value,expiredays) 
{ 
 var todayDate = new Date(); 
 todayDate.setDate( todayDate.getDate() + expiredays ); 
 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
}
 
 
setCookie('good','1',1)
 
 
/*쿠키추출*/
function getCookie( name )
{
 var nameOfCookie = name + "=";
 var x = 0;
 while ( x <= document.cookie.length )
 {
  var y = (x+nameOfCookie.length);
  if ( document.cookie.substring( x, y ) == nameOfCookie ) 
  {
   if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length;
   return unescape( document.cookie.substring( y, endOfCookie ) );
  }
  x = document.cookie.indexOf( " ", x ) + 1;
  if ( x == 0 ) break;
 }
 return "";
}
 
getCookie('good');  //출력값 1

'Dev Language > JAVASCRIPT' 카테고리의 다른 글

jQuery 정리  (0) 2015.06.04
javascript JS 호출(import)  (0) 2015.06.02
getElementsByClass  (0) 2015.04.21
JAVASCRIPT 날짜 사용하기  (0) 2015.04.07
JAVASCRIPT PARAM 값 가져오기  (0) 2015.03.19
Posted by 타카스 류지
|