js判断undefined类型,undefined,null, 的区别详细解析
js判断undefined类型今天使用showModalDialog打开页面,返回值时。当打开的页面点击关闭按钮或直接点浏览器上的关闭则返回值是undefined所以自作聪明判断 var reValue=window.showModalDialog("","",""); if (reValue== undefined){ alert("undefined");}发现判断不出来,最后查了下资料要用typeof方法:if (typeof(reValue) =...