js判断字符串为空或者为null 简写 if (str1!== null || str1!== undefined || str1!== '') { var str2= str1; } 下面是简写 var str2= str1|| ''; 真的是非常方便