js判断undefined
var exp = undefined;
if (typeof(exp) == "undefined")
{
alert("undefined");
}
js判断null
var exp = null;
if (!exp && typeof(exp)!=”undefined” && exp!=0)
{
alert(“is null”);
}
js判断null和undefined
var exp = undefined;
if (typeof(exp) == undefined)
{
alert("undefined");
}
原文链接:https://www.f2er.com/js/997317.html