**如何判断文本框中输入的为纯空格:str!=null&&"".equals(str.trim()) 当什么都不输入时 为 null。 转载于:https://www.cnblogs.com/hualidezhuanshen/archive/2013/06/09/3128633.html