7월, 2012의 게시물 표시

[css] media type

Media Types allow you to specify how documents will be presented in different media. The document can be displayed differently on the screen, on the paper, with an aural browser, etc.  ex) <html> <head> <style> @media screen   {   p.test {font-family:verdana,sans-serif;font-size:14px;}   } @media print   {   p.test {font-family:times,serif;font-size:10px;}   } @media screen,print   {   p.test {font-weight:bold;}   } </style> </head> <body> .... </body> </html> Media Type Description all Used for all media type devices aural Used for speech and sound synthesizers braille Used for braille tactile feedback devices embossed Used for paged braille printers handheld Used for small or handheld devices print Used for printers projection Used for projected presentations, like slides screen Used for computer screens tty Used for media using a fixed-pitch charact...

[css] break-word

.HardBreak {  white-space: pre-wrap; /* css-3 */  white-space: -moz-pre-wrap; /* Mozilla, since 1999 */  white-space: -pre-wrap; /* Opera 4-6 */  white-space: -o-pre-wrap; /* Opera 7 */  word-wrap: break-word; /* Internet Explorer 5.5+ */ } firefox에서도 =0=V 동작 잘함

[php] excel write / read

http://www.ibm.com/developerworks/opensource/library/os-phpexcel/ xml를 이용하여 excel 파일 다루기 =0=/

[javascript] null, undefined, NaN

[1] undefined undefined는 참 특이하다. typeof 연산자에서 'undefined'로 확인되는 자료형이자, undefined라는 동일한 이름인 하나의 값만을 가질 수 있는 값 자체이기도 하며, 의미상 변하지 않는 고유의 값만을 가졌기에 종종 전역 상수로 분류해 보기도 한다.  undefined의 할당 변수 선언과 동시에 자동으로 설정되어 있는 초기값이다. 1 직접 undefined를 값으로 대입하여 사용할 수 있다.  2 객체 내부의 존재하지 않는 프로퍼티에 설정된 값인 것처럼 받기도하며.  3  물론 존재하는 프로퍼티에도 undefined를 값으로 할당할 수도 있다.  4 함수 내부로 넘겨받는 인자에서 값이 설정되지 않은 경우, undefined 값을 갖는다.  어떤 형식이든  void  키워드가  앞서 사용되면 undefined로 반환한다. 5   undefined의 형 변환 Number(undefined) =>  NaN Boolean(undefined) => false String(undefined) => "undefined" null 과의 관계  (null == undefined) 는 참이다. (null === undefined) 는 거짓이다.  6 undefined는 유보어가 아니기에 사용자에 의해 변경될 수도 있다. (파이어폭스 제외) undefined는 비록 자료형으로 존재하나 값이 (래퍼) 객체도 아니기에, constructor도 존재하지 않고 constructor 접근시 오류가 발생한다. (== null과 동일) undefined는 자신에 대해 어떠한 프로퍼티를 설정할 수 없다. (== null과 동일) instanceof 연산자에서 모두 거짓을 반환하게 된다. (== null과 동일)  (!undefi...

[javascript] jquery - 선택된 라디오 버튼의 값 얻기

$("input[name='Name Attribute Value']:checked").val() ;

[javascript] string trim

javascript에서 String trim하는 함수 - string의 멤버 함수인 replace을 이용하여 구현한다. 예제 코드 <script>  var str = " abcd ";  (function ()  {   alert("[" + str.replace(/^\s*/, '').replace(/\s*$/, '') + "]");  }  )(); </script> / / :  정규화 타입 선언 ^  :  문자열의 처음 \s :  공백문자 *  :  앞의 문자에 대한 0~N개의 반복 $  :  문자열 끝