js页面中判断某个字符串是否为空 例如: var str = ""; if(str !== null || str!== "") 这样的判空操作,很不准确。 应改为: if(str.length == 0)这样得判断准确性要高