- 帖子
- 161
- 主題
- 26
- 精華
- 0
- 積分
- 187
- 點名
- 0
- 作業系統
- xp
- 軟體版本
- office 2010
- 閱讀權限
- 20
- 性別
- 男
- 來自
- TW
- 註冊時間
- 2011-1-2
- 最後登錄
- 2025-10-9
|
本帖最後由 wufonna 於 2014-12-14 15:09 編輯
回復 14# GBKEE
請問 大大 第一段對應的是這程式碼嗎,那第二段的我這樣改為何查無該股票代碼資料
諸問 大大 如何有誤,改如何做練習,謝謝
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> 查詢</button>
Set a = .Document.ALL.tags("BUTTON")
For Each e In a
If Trim(e.innertext) = "查詢" And e.ID = "" Then
e.Click
Exit For
End If
Next
<input type="radio" id="rdo_search_stk" tabindex="14" name="rdo_search" value="1" class="input-radio-search" checked><span>個股查詢</span>
<button id="header_search_btn" tabindex="17" class="input-button ui-corner-all" tabindex="13">搜尋</button>
Sub test()
Dim e As Object, a As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
'券商買賣證券日報表查詢系統(一般交易)
.Navigate "http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/brokerBS.php?l=zh-tw"
Do While .Busy Or .readyState <> 4: DoEvents: Loop
.Document.ALL.tags("INPUT")("rdo_search_stk").Value = 1
.Document.ALL.tags("INPUT")("input_search_site").Value = Trim(1258)
Set a = .Document.ALL.tags("BUTTON")
For Each e In a
If e.ID = "header_search_btn" Then
e.Click
Exit For
End If
Next
End With
End Sub |
|