验证字符串中是否包含空格
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title> New Document </title><script language="javascript"> <!-- var p = /\s/;var strH = ' test';//Space at headvar strB = 'te st';//Space at bodyvar strT = 'test ';//Space at tailvar strA = ' te st ';//Space at head & body & tailalert('resultH='+p.test(strH)+'\n'+'resultB='+p.test(strB)+'\nresultT='+p.test(strT)+'\nresultA='+p.test(strA)); // --></script></head><body></body></html>?