![]() |
|
||||||||||||||
| | 网站首页 | 数据库教程 | web编程 | 服务器 | 程序设计 | | ||
|
||
|
|||||
| web页面上 菜单弹出窗口 动态获取 数据 | |||||
作者:佚名 文章来源:不详 点击数: 更新时间:2007-9-2 ![]() |
|||||
|
正在装载数据…… <%@ page contentType="text/html; charset=GBK" %><%@ page import="com.yc.ycportal.blockimp.service.CommonService,java.util.List,java.util.Map" %> <html> <head> <XML language="XML" id="menuData"> <%! List list=null; StringBuffer str=new StringBuffer();; Map map=null; String ss=""; %> <%! public void handXml(List sonList){ for(int i=0;i<sonList.size();i++){ map = (Map)sonList.get(i); str.append("<menu id='"+map.get("ID").toString()+"' "); str.append("url='aaa' icon='images/r_earth.gif' title='title'"+" "); str.append("text='"+map.get("ITEM_NAME").toString()+"'>"); ss=map.get("ITEM_ID").toString(); List grandList=CommonService.getInstance().getDynamicTable("select * from dic_handadd where superior_id='"+ss+"'"); if(grandList!=null && grandList.size()>0){ handXml(grandList); } str.append("</menu>"); } } %> <% list=CommonService.getInstance().getDynamicTable("select * from dic_handadd where superior_id='h001'"); str.append("<xmlmenu arrow='images/arrow.right.gif'>"); str.append("<menu id='0' icon='images/r_heart.gif' text='text'>"); str.append("<menu id='h003' "); str.append("url='aaa' icon='images/r_earth.gif' title='title'"+" "); str.append("text='银行卡部'>"); handXml(list); str.append("</menu>"); str.append("</menu>"); str.append("</xmlmenu>"); out.print(str.toString()); %> </XML> <script language="JScript.Encode" src="menu.js"></script> </head> <body> <div id="menuC1"></div> <script language="JavaScript"> function aaa(){ alert(999); } var m = new XMLMenu("m"); m.loadDataIsland("menuData"); m.show(); m.smallMode(true); </script> </body> 本文来源:http://blog.csdn.net/zwhfyy/archive/2007/07/21/1701530.aspx
|
|||||
| 文章录入:admin 责任编辑:admin | |||||
| 【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 | |||||
| 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
| | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 网站公告 | 网站地图 | 管理登录 | | |||
|