源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

js用typeof方法判断undefined类型

  • 时间:2020-12-28 07:35 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:js用typeof方法判断undefined类型
js判断undefined类型
if (reValue== undefined)
{
alert("undefined");
}
发现判断不出来,最后查了下资料要用typeof方法:
if (typeof(reValue) == "undefined") 
{ 
alert("undefined"); 
}
 typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、"undefined"
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部