有一段获取当前IE的HTML的JS代码,请问如何转化为VBS代码?多谢 !
后面将结果输出到窗口中的部分不用管。感谢!~
<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;// -->
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
[解决办法]
再修改了一下,没有测试
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