//判断是否为空,为空返回true function strIsNullOrEmpty(str0) { var str = String(str0); var res = false; if (str == '' || str == null || str == undefined || str == 'undefined') res = true; return res; }