1.vb ?网页网页?ҳԴ??
vb ??ҳԴ??
'你把下面的代码保存为Form1.frm,然后双击打开该文件,源码源码空间刷网站源码运行后按提示即可看到结果。网页网页H5源码资源官网
'呵呵,源码源码主力共识位主图指标源码够详细了,网页网页个体防护产品溯源码厂商再不会我也没办法了。源码源码东方财富六彩神龙指标源码
'====文件Form1.frm====
VERSION 5.
Begin VB.Form Form1
Caption = "Form1"
ClientHeight =
ClientLeft =
ClientTop =
ClientWidth =
LinkTopic = "Form1"
ScaleHeight =
ScaleWidth =
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height =
Left =
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Top =
Width =
End
Begin VB.TextBox Text1
Height =
Left =
TabIndex = 1
Text = "我的网页网页家"
Top =
Width =
End
Begin VB.CommandButton Command1
Caption = "获取HTML源码"
Height =
Left =
TabIndex = 0
Top =
Width =
End
Begin VB.Label Label2
Caption = "注意:获取源码之前必须先用IE打开网址,然后输入窗口标题关键字。源码源码如www..com的网页网页标题关键字是:我的家"
Height =
Left =
TabIndex = 4
Top =
Width =
End
Begin VB.Label Label1
Caption = "请输入IE窗口标题:"
Height =
Left =
TabIndex = 3
Top =
Width =
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Function GetIeHtml(IeTitle As String) As String
Dim oShellApp: Set oShellApp = CreateObject("Shell.Application")
Dim oShellAppWindows: Set oShellAppWindows = oShellApp.Windows
Dim owin
'获取弹出的IE窗口
For Each owin In oShellAppWindows '获取弹出的IE窗口
If LCase(TypeName(owin.Document)) = "htmldocument" And _
InStr(1, owin.LocationName, IeTitle, vbTextCompare) > 0 Then '如果找到符合条件的IE窗口
GetIeHtml = owin.Document.activeElement.Document.documentElement.innerHTML '此句可获得完整html代码
GoTo Mend '退出
End If
Next
Mend:
Set oShellAppWindows = Nothing
Set oShellApp = Nothing
Set owin = Nothing
End Function
Private Sub Command1_Click()
Dim S As String
S = GetIeHtml(Text1.Text) '表示获得标题含有"我的家"的html代码
Text2.Text = S
End Sub
Private Sub Form_Load()
'Shell "explorer.exe ""/""", vbNormalNoFocus
End Sub
2024-12-22 23:1670人浏览
2024-12-22 22:582710人浏览
2024-12-22 22:092111人浏览
2024-12-22 21:532847人浏览
2024-12-22 21:511059人浏览
2024-12-22 21:461355人浏览
據多家美媒測算,當地時間3月2日,美國前總統特朗普繼續向美國2024大選共和黨提名進軍,贏得了愛達荷州、密蘇里州和密歇根州的黨團會議勝利。特朗普。美聯社資料圖) 據報道,目前特朗普已贏得了244張代
1.手机怎么看网页源代码2.怎么看网页的源代码?3.如何查看网页源代码?4.如何查看隐藏在网页中的网页源代码?5.如何在手机上查看网页源码?6.电脑如何查看网页的源码手机怎么看网页源代码 手机查看