allbory
2011년 12월 29일 목요일
[JavaScript] undefined 값 확인하기
잘못된 예
xxx == "undefined"
잘 사용한 예
document.getElementById("xxx").value = xxx == undefined ? "0" : xxx
댓글 없음:
댓글 쓰기
최근 게시물
이전 게시물
홈
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기