質問編集履歴
9
訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -63,9 +63,14 @@
|
|
63
63
|
</body>
|
64
64
|
```
|
65
65
|
|
66
|
+
|
67
|
+
|
66
68
|
```ここに言語を入力
|
67
|
-
自分なり
|
69
|
+
自分なりにやってみた回答
|
68
70
|
|
71
|
+
・replaceを使用したら"//standard"の状態になります。//は要らないので
|
72
|
+
indexOfを使用して削除したいです。
|
73
|
+
|
69
74
|
var aaa = document.getElementsByClassNmae("btnLink link-cream-orange with-icon").getElementsByTagName("a").replace(//g,"");
|
70
75
|
for(var i = 0; i < aaa.length; i++){
|
71
76
|
console.log(aaa);
|
8
訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -63,9 +63,11 @@
|
|
63
63
|
</body>
|
64
64
|
```
|
65
65
|
|
66
|
+
```ここに言語を入力
|
66
67
|
自分なりの回答
|
67
68
|
|
68
69
|
var aaa = document.getElementsByClassNmae("btnLink link-cream-orange with-icon").getElementsByTagName("a").replace(//g,"");
|
69
70
|
for(var i = 0; i < aaa.length; i++){
|
70
71
|
console.log(aaa);
|
71
|
-
}
|
72
|
+
}
|
73
|
+
```
|
7
文保の訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
やりたいことは下記HTMLソースから指定された要素を取得したいです。
|
5
5
|
|
6
6
|
・for文を使用して繰り返し取得できるようにしたい。
|
7
|
-
・
|
7
|
+
・indexOfを使用して // を取り除きたい。
|
8
8
|
・取得したい要素は "standard" "slim" "cado"の3つです。
|
9
9
|
|
10
10
|
ご教示お願い致します。
|
6
文法の訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -65,4 +65,7 @@
|
|
65
65
|
|
66
66
|
自分なりの回答
|
67
67
|
|
68
|
-
var aaa = document.getElementsByClassNmae("btnLink link-cream-orange with-icon").getElementsByTagName("a").replace(//g,"");
|
68
|
+
var aaa = document.getElementsByClassNmae("btnLink link-cream-orange with-icon").getElementsByTagName("a").replace(//g,"");
|
69
|
+
for(var i = 0; i < aaa.length; i++){
|
70
|
+
console.log(aaa);
|
71
|
+
}
|
5
コード訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -61,4 +61,8 @@
|
|
61
61
|
</div>
|
62
62
|
</div>
|
63
63
|
</body>
|
64
|
-
```
|
64
|
+
```
|
65
|
+
|
66
|
+
自分なりの回答
|
67
|
+
|
68
|
+
var aaa = document.getElementsByClassNmae("btnLink link-cream-orange with-icon").getElementsByTagName("a").replace(//g,"");
|
4
コード変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -20,9 +20,7 @@
|
|
20
20
|
</div>
|
21
21
|
<p>テキストテキストテキストテキストテキストテキスト</p>
|
22
22
|
<div class="btnLink link-cream-orange with-icon">
|
23
|
-
|
23
|
+
|
24
|
-
コード
|
25
|
-
```
|
26
24
|
☆取得したい要素がある場所
|
27
25
|
<a href="/products/standard">詳しくはこちら<i class="icon-right-dir-1 icon"></i></a>
|
28
26
|
|
3
コード使用
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,12 +5,13 @@
|
|
5
5
|
|
6
6
|
・for文を使用して繰り返し取得できるようにしたい。
|
7
7
|
・スライスの使い方
|
8
|
-
・取得したい要素は "standard" "slim" "cado"
|
8
|
+
・取得したい要素は "standard" "slim" "cado"の3つです。
|
9
9
|
|
10
10
|
ご教示お願い致します。
|
11
11
|
|
12
12
|
|
13
13
|
|
14
|
+
```ここに言語を入力
|
14
15
|
HTMLソース
|
15
16
|
<body>
|
16
17
|
<div class="right">
|
@@ -61,4 +62,5 @@
|
|
61
62
|
|
62
63
|
</div>
|
63
64
|
</div>
|
64
|
-
</body>
|
65
|
+
</body>
|
66
|
+
```
|
2
文法の訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -19,7 +19,9 @@
|
|
19
19
|
</div>
|
20
20
|
<p>テキストテキストテキストテキストテキストテキスト</p>
|
21
21
|
<div class="btnLink link-cream-orange with-icon">
|
22
|
-
|
22
|
+
```ここに言語を入力
|
23
|
+
コード
|
24
|
+
```
|
23
25
|
☆取得したい要素がある場所
|
24
26
|
<a href="/products/standard">詳しくはこちら<i class="icon-right-dir-1 icon"></i></a>
|
25
27
|
|
1
文法の訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,21 +5,24 @@
|
|
5
5
|
|
6
6
|
・for文を使用して繰り返し取得できるようにしたい。
|
7
7
|
・スライスの使い方
|
8
|
-
・取得したい要素は "
|
8
|
+
・取得したい要素は "standard" "slim" "cado">の3つです。
|
9
9
|
|
10
10
|
ご教示お願い致します。
|
11
11
|
|
12
12
|
|
13
13
|
|
14
14
|
HTMLソース
|
15
|
-
<
|
15
|
+
<body>
|
16
16
|
<div class="right">
|
17
17
|
<div class="products-list-ttl">
|
18
18
|
<h4><a href="/products/standard">文章1</a></h4>
|
19
19
|
</div>
|
20
20
|
<p>テキストテキストテキストテキストテキストテキスト</p>
|
21
21
|
<div class="btnLink link-cream-orange with-icon">
|
22
|
+
|
23
|
+
☆取得したい要素がある場所
|
22
24
|
<a href="/products/standard">詳しくはこちら<i class="icon-right-dir-1 icon"></i></a>
|
25
|
+
|
23
26
|
</div>
|
24
27
|
</div>
|
25
28
|
</li>
|
@@ -33,7 +36,10 @@
|
|
33
36
|
</div>
|
34
37
|
<p>テキストテキストテキストテキストテキストテキストテキストテキスト</p>
|
35
38
|
<div class="btnLink link-cream-orange with-icon">
|
39
|
+
|
40
|
+
☆取得したい要素がある場所
|
36
41
|
<a href="/products/slim">詳しくはこちら<i class="icon-right-dir-1 icon"></i></a>
|
42
|
+
|
37
43
|
</div>
|
38
44
|
</div>
|
39
45
|
</li>
|
@@ -47,7 +53,10 @@
|
|
47
53
|
</div>
|
48
54
|
<p></p>
|
49
55
|
<div class="btnLink link-cream-orange with-icon">
|
56
|
+
|
57
|
+
☆取得したい要素がある場所
|
50
58
|
<a href="/products/cado">詳しくはこちら<i class="icon-right-dir-1 icon"></i></a>
|
59
|
+
|
51
60
|
</div>
|
52
61
|
</div>
|
53
|
-
</
|
62
|
+
</body>
|