And to replace multiple spaces within a string, use: str = str.replace(/\s+/g," "); this replaces one and more spaces (globally) with one space.
確定! 回上一頁