質問編集履歴

1

書式の改善

2019/08/13 06:37

投稿

Webtuuuu
Webtuuuu

スコア30

test CHANGED
File without changes
test CHANGED
@@ -32,19 +32,21 @@
32
32
 
33
33
  $('#download').click(function() {
34
34
 
35
- //ファイルの中身
35
+ //ファイルの中身
36
36
 
37
- var content = 'sample.sh サンプルテキストサンプルテキストsampletextsampletext12345612345';
37
+ var content = 'sample.sh サンプルテキストサンプルテキスト
38
+
39
+ sampletextsampletext12345612345';
38
40
 
39
41
 
40
42
 
41
- var link = document.createElement('a');
43
+ var link = document.createElement('a');
42
44
 
43
- link.href = window.URL.createObjectURL(new Blob([content]));
45
+ link.href = window.URL.createObjectURL(new Blob([content]));
44
46
 
45
- link.download = 'test.bat';
47
+ link.download = 'test.bat';
46
48
 
47
- link.click();
49
+ link.click();
48
50
 
49
51
  });
50
52