js 判断字符为空

function checkIsNull(value){
if(typeof value=='undefined'){
return true;
}
if(value==null){
return true;
}
if (value.replace(/(^\s+)|(\s+$)/g,"").length ==0)
{
return true;
}
return false;
}

posted on 2016-01-13 15:49  zgz2016  阅读(171)  评论(0编辑  收藏  举报

导航