若何应用XmlTree呢?经过这个测试实例你将学会若何应用一个树形菜单。详细参数阐明:xmltree.xml文件内:
node 为树的一个节点,具备如下属性以及内容
属性
id: 编号,假如不惟一,只取第一个,其他被疏忽 (必需, 能够是恣意字符组合)
parentid: 父编号,不则为父节点 (可选, 能够是恣意字符组合)
内容
name: 称号 (必需)
link: 衔接 (可选)
target: 指标 (可选)
icon: 图标 (可选)
explain: 阐明 (可选)
xmltree.js文件外部分参数阐明:
var tree = new xmlTree('tree'); //天生工具
tree.mode = 1; //设置初始模式,默许全副封闭。0全副封闭,1全副开展
this.name = name; //实例称号
this.xmlFile = 'xmltree.xml'; //默许xml文件
this.iconPath = 'images/' //默许图标门路
this.iconFolder = 'tree_icon_folder.gif'; //默许文件夹图标
this.iconFile = 'tree_icon_file.gif'; //默许文件图标
this.iconOpen = 'tree_arrow_open.gif'; //默许箭头开展图标
this.iconOver = 'tree_arrow_over.gif'; //默许箭头流动图标
this.iconClose = 'tree_arrow_close.gif'; //默许箭头封闭图标
this.mode = 0; //初始模式,默许全副封闭。0全副封闭,1全副开展
this.html = ''; //终极输入html代码
this.prevTip = null; //上一次被显示的tip的工夫编号 (外部应用)
this.prevSelected = null; //上一次被选中的节点的主动编号 (外部应用)
可选图标箭头免费素材下载 XmlTree树形菜单剧本实例
60
0
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。