怎么将html转换为vbs,有一段获取当前IE的HTML的JS代码,请教怎么转化为VBS代码?谢谢...

有一段获取当前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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值