質問編集履歴

1

コードの書き換え

2018/03/31 06:52

投稿

coppepan
coppepan

スコア14

test CHANGED
File without changes
test CHANGED
@@ -4,13 +4,15 @@
4
4
 
5
5
  ```js
6
6
 
7
- var link = document.createElement( 'a' );
7
+ var link = document.createElement( 'a' );
8
8
 
9
- link.download = "file.jpg"
9
+ var imageUrl = "http://kokoro-racing.up.seesaa.net/image/GTS-E794BBE8B3AA.jpg";
10
10
 
11
- link.href = window.URL.createObjectURL( new Blob( [blob],{ type: "image/png" } ) );
11
+ link.href = imageUrl;
12
12
 
13
+ link.download = "file.png";
14
+
13
- link.click();
15
+ link.click();
14
16
 
15
17
  ```
16
18