回复 30楼 磁铁矿
程序模拟点击1~~38轮次
of = CREATEOBJECT("form1")
of.show
READ EVENTS
RETURN
DEFINE CLASS form1 as Form
Width = 800
Height = 600
ShowWindow = 2
ADD OBJECT URL AS TextBox WITH Top=10,Left=10,Width=300,Height=22,Anchor=11,;
Value = "http://info.
ADD OBJECT CMD1 AS CommandButton WITH Top=10,Left=320,Width=30,Height=22,Anchor=9,Caption = ">>>"
ADD OBJECT Combo1 AS ComboBox WITH Top=10,Left=370,Width=100,Height=22,Anchor=9,Style=2,Enabled=.T.
ADD OBJECT WB AS Olecontrol WITH Top=40,Left=0,Width=800,Height=460,Anchor=15,OleClass="Shell.Explorer.2",Visible=.T.
PROCEDURE UnLoad
CLEAR EVENTS
ENDPROC
PROCEDURE Init
this.WB.Silent = .T.
this.CMD1.Click
ENDPROC
PROCEDURE CMD1.Click
= .F.
thisform.Caption = "打开网页......"
thisform.WB.Navigate(ALLTRIM(thisform.URL.Value), 0, NULL, NULL, NULL)
thisform.WB.SetFocus
ENDPROC
PROCEDURE Combo1.init
this.AddItem("轮次列表")
FOR i=1 TO 38
this.AddItem(TRANSFORM(i))
ENDFOR
this.ListIndex = 1
ENDPROC
PROCEDURE Combo1.Click
IF this.Value != "轮次列表"
thisform.changeRound(VAL(this.value))
ENDIF
ENDPROC
PROCEDURE WB.documentComplete(pdisp, url)
IF (SYS(3095, pdisp) == SYS(3095, this))
= .T.
ENDIF
ENDPROC
PROCEDURE changeRound(i)
obj = thisform.WB.document.getElementById('Table2').getElementsByTagName('TD').Item[i]
firstNode = thisform.WB.document.getElementById("selectName")
firstNode.removeAttribute("id")
firstNode.style.backgroundColor = ""
IF EMPTY(firstNode.className)
firstNode.className = "lsm2"
ELSE
firstNode.setAttribute("class", "lsm2")
ENDIF
firstNode.style.cursor = "pointer"
obj.className = "lsm2"
obj.style.color = 0x003366
obj.style.backgroundColor = 0xF4731F
obj.setAttribute("id", "selectName")
thisform.WB.document.parentWindow.execScript("selectRound = parseInt('"+obj.innerHTML+"')", "JavaScript")
tBoday = thisform.WB.document.getElementById("Table3").tBodies[0]
FOR i=tBoday.childNodes.length-1 TO 2 STEP -1
tBoday.removeChild(tBoday.childNodes[i])
ENDFOR
thisform.WB.document.parentWindow.execScript("showSche()", "JavaScript")
thisform.WB.document.parentWindow.execScript("LoadTitleLeft()", "JavaScript")
ENDPROC
ENDDEFINE