python shell怎么打開 vb如何獲取已經(jīng)打開的ie網(wǎng)頁的源代碼?
vb如何獲取已經(jīng)打開的ie網(wǎng)頁的源代碼?在表單中添加控件text1(multiline=true,scrollbars=2)和Timer1(interval=1000),然后在代碼區(qū)復(fù)制以下代碼并運(yùn)行
vb如何獲取已經(jīng)打開的ie網(wǎng)頁的源代碼?
在表單中添加控件text1(multiline=true,scrollbars=2)和Timer1(interval=1000),然后在代碼區(qū)復(fù)制以下代碼并運(yùn)行它,以在text1中實(shí)時(shí)顯示IE中打開的網(wǎng)頁源代碼:option explicit Dimo shellapp,oshellappwindows,owindimurllstastingstring private subtimer1utimer()SetoShellApp=CreateObject()外殼.應(yīng)用)SetoShellAppWindows=oShellApp.windowsforeachowininoshellappwindowsiff案例(打印名(oWin.document文件))=“htmldocument”ThenIfInStr(1,UrlLstoWin.locationurl,vbTextCompare)=0THENURLST=URLST&oWin.locationurl&“,”文本1.Text=oWin.document.body文件. innerHTMLMe.Caption=oWin.locationnameEndI fEndIfNextEndSub公司