質問するログイン新規登録

質問編集履歴

5

誤字修正

2021/02/24 10:27

投稿

janhampino
janhampino

スコア6

title CHANGED
File without changes
body CHANGED
@@ -5,7 +5,7 @@
5
5
  ・html上の「ローカルファイルを選択」ボタンをクリック
6
6
  ・「ローカルファイルを選択」とは別の要素の見た目上見えなくしてある<input type=file>を.trigger("click")を使用して間接的に発火
7
7
  ・発火させた<input type="file">のイベントによりPCのファイルを選択し「開く」を押す
8
- ・ファイル情報を取得しファイル名を<div>file-boxという要素を作成後そこに出力
8
+ ・ファイル情報を取得しファイル名を<div>input-file-boxという要素を作成後そこに出力
9
9
  ・次回分のinput要素を先ほど使用したinputの隣に追加
10
10
  以上
11
11
  再度同じフローを踏んでファイルを選択すると2つ目以降のファイル名が横にどんどん並ぶように追加されていくというような結果を想定しています。

4

コード間違いの修正

2021/02/24 10:27

投稿

janhampino
janhampino

スコア6

title CHANGED
File without changes
body CHANGED
@@ -45,9 +45,9 @@
45
45
  $("#js-open-local-file").click(addLocalFile);
46
46
  ```
47
47
  ```html
48
- <form class="p-send-form" action="">
48
+ <form class="form" action="">
49
- <div class="p-input-send-wrapper">
49
+ <div class="wrapper">
50
- <div class="p-input-files-wrapper" id="js-input-files-wrapper">
50
+ <div class="input-files-wrapper" id="js-input-files-wrapper">
51
51
                <!--- このコメント内の要素にファイル名を出力してファイルを選択するごとに横に並べる
52
52
                <div class="input-file-box" id="input-file-box-1">
53
53
  <div class="clip-icon"> </div>

3

コード間違いの修正

2021/02/24 10:21

投稿

janhampino
janhampino

スコア6

title CHANGED
File without changes
body CHANGED
@@ -57,7 +57,7 @@
57
57
  </div></div>
58
58
  <div class="clone-origin-file-input-elm" id="clone-origin-file-input-elm">
59
59
  <input class="input-local-file" id="local-file-1" type="file">
60
- <!--- ここにinput fileを追加していく--->
60
+ <!--- ここに input type=file を追加していく--->
61
61
  </div>
62
62
 
63
63
  </div>

2

コード間違いの修正

2021/02/24 10:19

投稿

janhampino
janhampino

スコア6

title CHANGED
File without changes
body CHANGED
@@ -61,9 +61,7 @@
61
61
  </div>
62
62
 
63
63
  </div>
64
- <div class="items-wrapper">
64
+
65
- <button class="js-which-file" type="button"></button>
66
- </div>
67
65
  </form>
68
66
  <button id="js-open-local-file" type="button">
69
67
  ローカルファイルを選択

1

誤字修正

2021/02/24 10:18

投稿

janhampino
janhampino

スコア6

title CHANGED
File without changes
body CHANGED
@@ -6,7 +6,7 @@
6
6
  ・「ローカルファイルを選択」とは別の要素の見た目上見えなくしてある<input type=file>を.trigger("click")を使用して間接的に発火
7
7
  ・発火させた<input type="file">のイベントによりPCのファイルを選択し「開く」を押す
8
8
  ・ファイル情報を取得しファイル名を<div>file-boxという要素を作成後そこに出力
9
- ・次回分のinput要素を追加先ほど使用したinputの隣に追加
9
+ ・次回分のinput要素を先ほど使用したinputの隣に追加
10
10
  以上
11
11
  再度同じフローを踏んでファイルを選択すると2つ目以降のファイル名が横にどんどん並ぶように追加されていくというような結果を想定しています。
12
12
  以下ののコードにてファイルを選択した際は想定通りの出力結果を得られたのですが、