~~~ /* * 校验是否为空(null/空串) */ var checkNull = function(str){ if(str == null || str == ""){ return false; } return true; } ~~~