1,502
社区成员
发帖
与我相关
我的任务
分享
Private Sub Form_Load()
WebBrowser1.Navigate2 "http://www.diamondwave.com/-strse-template/diamondsearch-dsh-advanced/Page.bok"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim yy
Set yy = WebBrowser1.document.getElementById("vfvSlider")
yy.Value = yy.Value + 1
WebBrowser1.document.parentWindow.execScript "javascript:void(false);"
If yy.Value = 5 Then Exit Sub
End Sub
s ="D_centerstoneweightSliderChange('vfD_centerstoneweightSlider',1,0,1);D_centerstoneweightSliderChange('vfD_centerstoneweightSlider2',2,0,2);vSliderChange('vfvSlider',25,1);
WebBrowser1.document.parentWindow.execScript s
Private Sub CommandButton1_Click()
Dim dmt As HTMLDocument
Set dmt = WebBrowser1.Document
Dim yy As Object
Set yy = WebBrowser1.Document.all("arcvSlider") '.all(0)
If yy Is Nothing Then Exit Sub
v1 = "1" ' 数字结尾不能有 0
v2 = "2"
s3 = "*Attribute1Values <= " & v2 & " && Attribute1Values >= " & v1 & "*"
s = "javascript:D_centerstoneweightSliderChange('vfD_centerstoneweightSlider'," & v1 & ",0,1);D_centerstoneweightSliderChange('vfD_centerstoneweightSlider2'," & v2 & ",0,2);D_centerstoneweightSliderEnd('vfD_centerstoneweightSlider2'," & v2 & ",0)"
Set t = dmt.all("returnByoDiamonds")
ss = t.innerText
Debug.Print ss
If Not ss Like s3 Then
dmt.parentWindow.execScript s ' 滚动条的值 如何设置Carat Weight的值为1-2
ss1 = ss
Do While Not ss1 Like s3
DoEvents
Set t = dmt.all("returnByoDiamonds")
ss1 = t.innerText
Loop
End If
'翻页 11楼的代码可以合并
'Me.WebBrowser1.Document.parentWindow.execScript "Bs_Objects[8].onChangeByArrow(true, true);Bs_Objects[8].stopFireArrow()"
Set yy = WebBrowser1.Document.all("arcvSlider")
vul = WebBrowser1.Document.all("vfvSlider").Value + 5
Do While WebBrowser1.Document.all("vfvSlider").Value * 1 <> vul
yy.all(0).onmousedown
yy.all(0).onmouseup
Loop
End Sub