欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

js用typeof方法判斷undefined類型

 更新時間:2014年07月15日 17:38:16   投稿:whsnow  
js判斷undefined類型,可以使用typeof方法,typeof 返回的是字符串,其中就有一個是undefined

js判斷undefined類型

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

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

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

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

相關(guān)文章

最新評論