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;
}
原文地址:https://www.cnblogs.com/zgz21/p/5127517.html