蝙蝠岛资源网 Design By www.hbtsch.com

js判断undefined类型

if (reValue== undefined)
{
alert("undefined");
}

发现判断不出来,最后查了下资料要用typeof方法:

if (typeof(reValue) == "undefined") 
{ 
alert("undefined"); 
}

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

标签:
typeof,undefined

蝙蝠岛资源网 Design By www.hbtsch.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
蝙蝠岛资源网 Design By www.hbtsch.com

评论“js用typeof方法判断undefined类型”

暂无js用typeof方法判断undefined类型的评论...