JavaScript把null、undefined、0、NaN和空字符串''视为false,其他值一概视为true 转载于:https://www.cnblogs.com/donke/p/10014110.html