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");}