js小判断

判断是undefined
if(typeof(myvariable)=="undefined")
判断是null或者undifined
if(!myvariable)

原文地址:https://www.cnblogs.com/Benjamin/p/3026815.html