回答編集履歴

1

id.matchに不要な引数が含まれていたため修正

2018/10/07 05:17

投稿

crsh
crsh

スコア30

test CHANGED
@@ -194,7 +194,7 @@
194
194
 
195
195
  const id = $option.attr('id');
196
196
 
197
- const no = id.match(/^ge(\d+)$/, '')[1];
197
+ const no = id.match(/^ge(\d+)$/)[1];
198
198
 
199
199
  const path = `./index.php?no=${no}&year=${arg.year}&month=${arg.month}&day=${arg.day}&view=${arg.view}`;
200
200
 
@@ -224,7 +224,7 @@
224
224
 
225
225
  const id = option.id;
226
226
 
227
- const no = id.match(/^ge(\d+)$/, '')[1];
227
+ const no = id.match(/^ge(\d+)$/)[1];
228
228
 
229
229
  const path = `./index.php?no=${no}&year=${arg.year}&month=${arg.month}&day=${arg.day}&view=${arg.view}`;
230
230