当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 一个无限级XML绑定跨框架菜单(For IE)

Javascript
Add a Table to a Word Document
Add Formatted Text to a Word Document
用jscript实现新建word文档
用jscript实现新建和保存一个word文档
Open and Print a Word Document
Use Word to Search for Files
Convert Seconds To Hours
Sample script that deletes a SQL Server database
Sample script that displays all of the users in a given SQL Server DB
firefox中用javascript实现鼠标位置的定位
div+css实现鼠标放上去,背景跟图片都会变化。
Locate a File Using a File Open Dialog Box
Save a File Using a File Save Dialog Box
用jscript实现列出安装的软件列表
List the Stored Procedures in a SQL Server database
Display SQL Server Login Mode
Display SQL Server Version Information
List all the Databases on a SQL Server
用jscript启动sqlserver
Stop SQL Server

Javascript 中的 一个无限级XML绑定跨框架菜单(For IE)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 372 ::
收藏到网摘: n/a

不是很完善,但是能够应付基本的使用了
演示: http://test.empiresoft.net.cn:4/Test/MenuDemo/index.html (如果不能访问,可能是你的DNS服务器不支持别名解析)
使用方法:
var menu = new Rimifon.Web.Menu();
menu.DataSource = "menu.xml";
menu.DataBind(document.body); //将菜单绑定到document.body内。
xml数据格式:
复制代码 代码如下:

<?xml version="1.0" encoding="utf-8" ?>
<MainMenu>
<MenuItem Text="文件(F)" PID="0" MID="1" />
<MenuItem Text="新建(N)" PID="1" MID="2" Click="alert(this.innerHTML)" />
<MenuItem Text="-" PID="1" />
<MenuItem Text="打开(O)" PID="1" MID="3" Href="http://www.baidu.com" />
<MenuItem Text="编辑(E)" PID="0" MID="4" />
</MainMenu>

下载文件 下载此文件