亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

使用typeof方法判斷undefined類(lèi)型

 更新時(shí)間:2014年09月09日 17:05:09   投稿:whsnow  
使用typeof方法,typeof 返回的是字符串,其中就有一個(gè)是undefined,下面是示例代碼,大家可以看看

有關(guān)js判斷undefined類(lèi)型,使用typeof方法,typeof 返回的是字符串,其中就有一個(gè)是undefined。

js判斷undefined類(lèi)型

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

發(fā)現(xiàn)判斷不出來(lái),最后查了下資料要用typeof方法:

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

typeof 返回字符串,有六種可能:"number"、"string"、"boolean"、"object"、"function"、"undefined"。
在使用時(shí)一定要注意。

相關(guān)文章

最新評(píng)論