明净

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

    if (reValue== undefined){

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

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

posted on 2015-06-02 15:14  明净  阅读(180)  评论(0)    收藏  举报