如何找到页面的路径 [英] How to find the path of the page

查看:144
本文介绍了如何找到页面的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好用im创建菜单

我想用javascript获取页面的菜单路径



例如我的页面来自这个



设置 - > Master->区域



我如何得到这条路径使用javascript

Hi i m creating menu using css
I want to get the menu path of the page using javascript

For example if my page is coming from this

Settings->Master->Area

How I get this path using javascript

推荐答案

试试这个:



在MenuEvent.ITEM_CLICK事件: -



Try this:

On MenuEvent.ITEM_CLICK event: -

private function menuHandler(event:MenuEvent):void
{
    var pathArray:Array = new Array();
    pathArray.push(event.item.@label);

    var parent:XML = event.item.parent(); 

    while(parent != null)
    {
        pathArray.push(parent["@label"]);
        parent = parent.parent();

    }
    pathArray.reverse();
    trace(pathArray)
}


关注此链接



http://www.aspdotnet-suresh.com/2012/09/ sitemap-navigation-control-example-in.html [ ^ ]


这篇关于如何找到页面的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆