*typeof 정확한 판별
2009/11/26 16:26
Leave a Comment
@http://www.juniac.net/176
출력 : [object String][object Array][object Object][object Number][object Boolean]
function typeoftostr(o) {
return Object.prototype.toString.call(o);
}
document.write(typeoftostr("dfdf"));
document.write(typeoftostr([]));
document.write(typeoftostr({}));
document.write(typeoftostr(1));
document.write(typeoftostr(true));
'JS' 카테고리의 다른 글
| 모바일웹 자동 이동 (0) | 2011/04/25 |
|---|---|
| html 태그 <...> 삭제하기 (0) | 2010/06/23 |
| typeof 정확한 판별 (0) | 2009/11/26 |
| DOM 프로퍼티 (0) | 2009/11/04 |
| 이미지 리사이징 (0) | 2009/10/23 |
| 스크립트 동적으로 로딩하기 - importJS(jfunc,jsrc,jchar) (0) | 2009/10/20 |