5,139
社区成员
发帖
与我相关
我的任务
分享
Private Sub process(ByRef WB As WebBrowser)
Dim Doc As HTMLDocument
Dim Root As HTMLHtmlElement
Set Doc = WB.Document
Set Root = Doc.getElementsByTagName("html").Item
MsgBox Root.innerHTML
End Sub
Private Sub CommandButton1_Click()
Dim SW As New ShellWindows
Dim WB As WebBrowser
For Each WB In SW
If TypeOf WB.Document Is HTMLDocument Then
process WB
End If
Next
Set SW = Nothing
Set WB = Nothing
End Sub
<html>
<head>
<title></title>
<script language="javascript">
function fnOpenModal(){
window.showModalDialog("popup.html",window);
}
function fnOpenModeless(){
window.showModelessDialog("popup.html",window);
}
</script>
</head>
<body>
<button onclick="fnOpenModal()">fnOpenModal</button>
<button onclick="fnOpenModeless()">fnOpenModeless</button>
</body>
</html>