var firefoxIngs = myText.replace(/ /g," ");
这是我的字符串:
"h a"//it has two empty spaces between h and a
代码之后变成:
"h a"//it has one empty spaces between h and a
我希望它是
"h a"
为什么会发生这种情况以及如何解决?
最佳答案
关于javascript - 替换多个空白区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13579841/