用JavaScript读取文本中某一行后,想删掉这一行中的空格,该怎么写程序?
正则替换下空白字符
s=s.replace(/\s/g,'')
用正则表达式。 看参考:http://blog.csdn.net/zaifendou/article/details/5746988