回答編集履歴

1

chousei

2021/07/08 02:51

投稿

yambejp
yambejp

スコア116732

test CHANGED
@@ -1,7 +1,13 @@
1
1
  ```javascript
2
+
3
+ form.addEventListener('submit', (_ev) => {
4
+
5
+ _ev.preventDefault();
2
6
 
3
7
  const request = form.getAttribute("action")+"?"+ [...new FormData(form)].map(arg=>arg.map(encodeURIComponent).join('=')).join("&");
4
8
 
5
- console.log(url);
9
+ console.log(request);
10
+
11
+ });
6
12
 
7
13
  ```