有一段获取当前IE的HTML的JS代码,请问如何转化为VBS代码?多谢 ! 后面将结果输出到窗口中的部分不用管。感谢!~ VB code script language=JavaScript defer!--// specific to context menu extensionsvar win = external.menuArguments;// the document obj
有一段获取当前IE的HTML的JS代码,请问如何转化为VBS代码?多谢 !
后面将结果输出到窗口中的部分不用管。感谢!~
VB code
------解决方案--------------------
未测试
VBScript codewin = external.menuArguments
' the document object the user right-clicked on
doc = win.document
' the html string composing most of the document (everything inside the tags
szsource = ""
szsource = doc.documentElement.outerHTML
' make sure our debugging window is a unique window
wincounter = 0
mywin = window.open("about:blank", "fullsource" + wincounter++, "toolbar=no,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes")
while mywin = null
mywin = window.open("about:blank", "fullsource" + wincounter++, "toolbar=no,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes")
wend ' if mywin = null
myDoc = mywin.document
call myDoc.open("text/plain")
call myDoc.write(szsource)
call myDoc.close()
myDoc.title = "Full Source for: " + win.location.href
------解决方案--------------------
再修改了一下,没有测试VBScript codewin = external.menuArguments
' the document object the user right-clicked on
doc = win.document
' the html string composing most of the document (everything inside the tags
szsource = ""
szsource = doc.documentElement.outerHTML
' make sure our debugging window is a unique window
wincounter = 0
mywin = window.open("about:blank", "fullsource" + winco【本文来自鸿网互联 (http://www.68idc.cn)】unter, "toolbar=no,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes")
wincounter = wincounter + 1
while mywin = null
mywin = window.open("about:blank", "fullsource" + wincounter, "toolbar=no,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes")
wincounter = wincounter + 1
wend ' if mywin = null
myDoc = mywin.document
call myDoc.open("text/plain")
call myDoc.write(szsource)
call myDoc.close()
myDoc.title = "Full Source for: " + win.location.href