vb webbrowser 如何访问框架里的菜单链接
代码附后,我现在想编程让菜单自动打开,
这个菜单应该是【综合查询】-【用户信息查询】-【热用户交欠费信息查(打印)】
现在登录后。默认是综合查询菜单状态,点击后会打开下一级【用户信息查询】
现在想编程实现登录后自动打开到第三层菜单,应该如何写代码呢?
用下面的语句
webbrowser1.Document.frames(1).Document.frames(0).Document.All.tags("A")(0).Click
提示【找不到成员】
不知应该如何写代码去点击菜单的链接,这个语句可以访问最里面一层的链接,
但菜单就不行了。
<DIV style="WIDTH: 146px; TOP: 0px; LEFT: 0px" id=tree class="x-panel x-border-panel x-tree"><DIV id=ext-gen10 class=x-panel-bwrap><DIV style="WIDTH: 146px; HEIGHT: 356px; OVERFLOW: auto" id=ext-gen11 class="x-panel-body x-panel-body-noheader"><UL id=ext-gen12 class="x-tree-root-ct x-tree-lines"><DIV class=x-tree-root-node><LI class=x-tree-node><DIV class="x-tree-node-el x-unselectable x-tree-node-collapsed" unselectable="on" ext:tree-node-id="19"><SPAN class=x-tree-node-indent></SPAN><IMG class="x-tree-ec-icon x-tree-elbow-end-plus" src="http://192.168.1.2/ssc/res/images/default/s.gif"><IMG class="x-tree-node-icon image_file" src="http://192.168.1.2/ssc/res/images/default/s.gif" unselectable="on"><A hideFocus class=x-tree-node-anchor tabIndex=1 href="http://192.168.1.2/ssc/jsp/tree/MenuTree.jsp#" target=moonpiazza><SPAN unselectable="on">综合查询</SPAN></A></DIV><UL style="DISPLAY: none" class=x-tree-node-ct></UL></LI></DIV></UL></DIV></DIV></DIV><DIV id=menuTree></DIV><SCRIPT language=javascript><!--Ext.BLANK_IMAGE_URL = "/dljzgr/res/images/default/s.gif";Ext.onReady(function(){ Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); Ext.QuickTips.init(); var Tree = Ext.tree; var root = new Tree.AsyncTreeNode({ text: '菜单', draggable:false, id:'root', children: [{"id":"19","text":"综合查询","parentid":"0","sort":"19","hrefTarget":"moonpiazza","iconCls":"image_file","children":[{"id":"36","text":"用户信息查询","parentid":"19","sort":"36","hrefTarget":"moonpiazza","iconCls":"image_file","children":[{"id":"39","text":"热用户交欠费信息(打印)","href":"http://192.168.1.2/ssc/control/finduser?opstatus=Q","parentid":"36","sort":"39","hrefTarget":"moonpiazza","leaf":"true","iconCls":"summary","children":[]}]}]}] }); var viewport = new Ext.Viewport({ layout:'border', el:"menuTree", items:[ new Tree.TreePanel({ id:'tree', region:'center', root:root, collapsible: true, split:true, lines: true, autoScroll:true, layout:'fit', rootVisible:false, loader: new Tree.TreeLoader() }) ] }); root.expand(); //root.firstChild.expand(); });</SCRIPT>