引用Microsoft HTML Object Library
-
Private WithEvents m_oDoc As HTMLDocument
Dim oEvent As CEventObjPrivate Sub Command1_Click()
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate "http://localhost:82/index.asp"
End SubPrivate Function m_oDoc_onclick() As Boolean
Set oEvent = m_oDoc.parentWindow.event
If oEvent.srcElement.id = "login" Then
Form2.Show
Form2.WebBrowser1.Navigate "http://localhost:82/receive.asp"
End If
End FunctionPrivate Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Set m_oDoc = pDisp.Document
End Sub
index.asp
-
<form>
<input type='button' value="登陆" id="login"></input>
</form>
时间: 2024-10-30 00:25:09