“” == false 总结:如果为空的话,我们可以这么写: If(!s) {xxxxxxx} 等同于 (s == ‘') {xxxxxxx} If(s) {xxxx} 等同于if(s !== ‘') {xxxxxxx} 转载于:https://www.cnblogs.com/bgwhite/p/9805718.html