首页 > Web开发 > 详细

jstypeof方法判断undefined类型

时间:2014-07-16 08:33:56      阅读:400      评论:0      收藏:0      [点我收藏+]

有关js判断undefined类型,使用typeof方法,typeof 返回的是字符串,其中就有一个是undefined。 

js判断undefined类型
if (reValue== undefined)
{
alert("undefined");
}
发现判断不出来,最后查了下资料要用typeof方法:
if (typeof(reValue) == "undefined")
{  www.jbxue.com
alert("undefined");
}
typeof 返回字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、"undefined"。
在使用时一定要注意。

jstypeof方法判断undefined类型,布布扣,bubuko.com

jstypeof方法判断undefined类型

原文:http://www.cnblogs.com/cfinder010/p/3847852.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!