js判断一个变量为空的终极解决方案

时间:2014-12-04 15:43:53   收藏:0   阅读:161

var item;

if(typeof(item) == "undefined" || typeof(item) == "null" || item== null || item== "null" ){

item="is null";
}
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!