Method 1: Use the replace regular matching method Remove all spaces: str = str.replace(/\s*/g,""); Remove double spaces: str = str.replace(/^\s*|\s*$/g,""); ...
確定! 回上一頁