回答編集履歴
4
回答を再々修正しました。これでダメなら私では無理です。
answer
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
hasAttributeで判定できないでしょうか。
|
2
|
-
(実際に試してはいません。回答を修正しました。)
|
2
|
+
(実際に試してはいません。回答を再々修正しました。)
|
3
3
|
```VBA
|
4
4
|
'If dl_li.getAttribute("className") = "fare" Then
|
5
|
-
|
5
|
+
|
6
6
|
If dl_li.hasAttribute("class") Then
|
7
|
+
if dl_li.Attributes("class").Value = "fare" then
|
8
|
+
'乗換案内のルート1の金額を取得する
|
9
|
+
ws.Cells(i, 10).Value = dl_li.innerText
|
10
|
+
End If
|
11
|
+
End If
|
7
12
|
```
|
3
hasAttributeの記述を再修正
answer
CHANGED
@@ -3,5 +3,5 @@
|
|
3
3
|
```VBA
|
4
4
|
'If dl_li.getAttribute("className") = "fare" Then
|
5
5
|
'If dl_li.hasAttribute("fare") Then
|
6
|
-
If dl_li.hasAttribute("class")
|
6
|
+
If dl_li.hasAttribute("class") Then
|
7
7
|
```
|
2
誤記修正
answer
CHANGED
@@ -2,6 +2,6 @@
|
|
2
2
|
(実際に試してはいません。回答を修正しました。)
|
3
3
|
```VBA
|
4
4
|
'If dl_li.getAttribute("className") = "fare" Then
|
5
|
-
|
5
|
+
'If dl_li.hasAttribute("fare") Then
|
6
6
|
If dl_li.hasAttribute("class") = "fare" Then
|
7
7
|
```
|
1
hasAttributeの記載修正
answer
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
hasAttributeで判定できないでしょうか。
|
2
|
-
(実際に試してはいません。)
|
2
|
+
(実際に試してはいません。回答を修正しました。)
|
3
3
|
```VBA
|
4
4
|
'If dl_li.getAttribute("className") = "fare" Then
|
5
|
-
If dl_li.hasAttribute("fare") Then
|
5
|
+
’If dl_li.hasAttribute("fare") Then
|
6
|
+
If dl_li.hasAttribute("class") = "fare" Then
|
6
7
|
```
|