---
title: "js判断undefined类型"
author: "Caraly"
date: "2013-09-03T16:00:19Z"
tags: ["JavaScript", "undefined"]
categories: ["Web前端"]
slug: "js-undefined"
draft: false
lastmod: "2013-10-30T10:12:21Z"
id: 1935955
url: "https://caraly.iteye.com/blog/1935955"
---

## [js判断undefined类型](http://www.cnblogs.com/binaryworms/archive/2010/04/08/1707064.html)

##### if (reValue== undefined){     alert("undefined");     }   发现判断不出来，最后查了下资料要用typeof 方法： if (typeof(reValue) == "undefined") {     alert("undefined");  }

typeof 返回的是字符串，有六种可能："number"、"string"、"boolean"、"object"、"function"、"undefined"

 

 

 

推荐下朋友开的淘宝店筱夜宫主（[http://xiaoyegongzhu.taobao.com/](http://xiaoyegongzhu.taobao.com/)）DR.HU 胡博士美妆~坐在电脑旁的汉子姑娘注意脸部护理呀，做了程序媛，也要美丽啊。。。小店有优惠码：YE4450，报优惠码，抵两元券，(⊙o⊙)…