if (reValue== undefined){
alert(\"undefined\");
}
发现判断不出来,最后查了下资料要用typeof
方法:
if (typeof(reValue) == \"undefined\") {
alert(\"undefined\");
}
typeof 返回的是字符串,有六种可能:\"number\"、\"string\"、\"boolean\"、\"object\"、\"function\"、\"undefined\"
本文地址:https://www.stayed.cn/item/5118
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请 联系我