2016-12-13 9 views
1

変数内のスペースを "%20"に置き換えます。最初のスペースのみが置き換えられます。私はそれらのすべてを交換したいと思います。シート内のスペースを置換する(Google Appsスクリプト)

var Answer30Address = answer30.toString()。replace( ""、 "%20");

+0

外観:http://stackoverflow.com/questions/1144783/how-to-replace-all-occurrences-of-a-string-in-javascript –

答えて

0

正規表現を使用すると、すべて置き換えられます。これは必要です。ここで最高得点の答えで

var Answer30Address = answer30.toString().replace(/ /g, "%20"); 
関連する問題