首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > vbScript >

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

2012-02-29 
有一段获取当前IE的HTML的JS代码,请问如何转化为VBS代码?多谢 !后面将结果输出到窗口中的部分不用管。感谢!

有一段获取当前IE的HTML的JS代码,请问如何转化为VBS代码?多谢 !
后面将结果输出到窗口中的部分不用管。感谢!~

VB code
<script language="JavaScript" defer><!--// specific to context menu extensionsvar win = external.menuArguments;// the document object the user right-clicked onvar doc = win.document;// the html string composing most of the document (everything inside the <HTML></HTML> tagsvar szsource = "";szsource = doc.documentElement.outerHTML;// make sure our debugging window is a unique windowvar wincounter = 0;var 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");} // if (mywin == null)var myDoc = mywin.document;myDoc.open("text/plain");myDoc.write(szsource);myDoc.close();myDoc.title = "Full Source for: " + win.location.href;// -->


[解决办法]
未测试
VBScript code
win = external.menuArguments' the document object the user right-clicked ondoc = win.document' the html string composing most of the document (everything inside the <HTML></HTML> tagsszsource = ""szsource = doc.documentElement.outerHTML' make sure our debugging window is a unique windowwincounter = 0mywin = 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 = nullmyDoc = mywin.documentcall myDoc.open("text/plain")call myDoc.write(szsource)call myDoc.close()myDoc.title = "Full Source for: " + win.location.href
[解决办法]
再修改了一下,没有测试
VBScript code
win = external.menuArguments' the document object the user right-clicked ondoc = win.document' the html string composing most of the document (everything inside the <HTML></HTML> tagsszsource = ""szsource = doc.documentElement.outerHTML' make sure our debugging window is a unique windowwincounter = 0mywin = window.open("about:blank", "fullsource" + wincounter, "toolbar=no,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes")wincounter = wincounter + 1while mywin = null    mywin = window.open("about:blank", "fullsource" + wincounter, "toolbar=no,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes")    wincounter = wincounter + 1wend ' if mywin = nullmyDoc = mywin.documentcall myDoc.open("text/plain")call myDoc.write(szsource)call myDoc.close()myDoc.title = "Full Source for: " + win.location.href 

热点排行