手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >js用typeof方法判断undefined类型
js用typeof方法判断undefined类型
摘要:js判断undefined类型if(reValue==undefined){alert("undefined");}发现判断不出来,最后查了...

js判断undefined类型

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

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

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

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

【js用typeof方法判断undefined类型】相关文章:

js中跨域方法原理详解

JavaScript中strike()方法的使用介绍

AngularJs中route的使用方法和配置

js输入中文效果

详解JavaScript中setSeconds()方法的使用

javascript中一些util方法汇总

JavaScript中用getDate()方法返回指定日期的教程

JQuery中attr方法和removeAttr方法用法实例

Jquery使用val方法读写value值

javascript去除空格方法小结

精品推荐
分类导航