質問編集履歴

2

しゅうせい

2020/06/23 16:06

投稿

hosodaaaaa
hosodaaaaa

スコア47

test CHANGED
File without changes
test CHANGED
@@ -30,7 +30,7 @@
30
30
 
31
31
  $('.foo ').click(function() {
32
32
 
33
- const i = $('foo input').data('id')
33
+ const i = $('.foo input').data('id')
34
34
 
35
35
  console.log(i)
36
36
 

1

修正

2020/06/23 16:06

投稿

hosodaaaaa
hosodaaaaa

スコア47

test CHANGED
File without changes
test CHANGED
@@ -6,19 +6,19 @@
6
6
 
7
7
  <div class="foo">
8
8
 
9
- <input data="a">
9
+ <input data-id="a">
10
10
 
11
11
  </div>
12
12
 
13
13
  <div class="foo">
14
14
 
15
- <input data="b">
15
+ <input data-id="b">
16
16
 
17
17
  </div>
18
18
 
19
19
  <div class="foo">
20
20
 
21
- <input data="c">
21
+ <input data-id="c">
22
22
 
23
23
  </div>
24
24