0
我想在代碼中顯示的網頁的底部,請單擊下面點擊網頁按鈕與VBA
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
.navigate "http://tvlistings.zap2it.com/tv/movies-on-tv?aid=zap2it&tod=rightNow&vn=sm"
.Top = 50
.Left = 530
.Height = 400
.Width = 400
Do Until Not IE.Busy And IE.readyState = 4
DoEvents
Loop
End With
我試過下面的代碼「顯示一夜之間」按鈕點擊沒有成功
IE.Document.GetElementsByClassName("zc-item-button").Item(1).Click
IE.Document.GetElementsByClassName("zc-item-button").Item(1).FireEvent ("click()")
按鈕,我認爲相關的源代碼是:
<div class="zc-item-button">
<a href="" onclick="$('#overnight-bucket').show();$('#overnight-bucket').find('.open').each(function(){writeShows($(this));});$(this).hide();return false;" class="">Show Overnight</a>
</div>
感謝您的幫助,我很感激...... Ron
有多少'zc-item-button's?你應該引用'Item(0)'? – Sam
有3個(0,1和2),按鈕「1」是我感興趣的一個 – ron