返回目录

在写完首篇cache文章后,有些朋友给我来信,希望可以使用JS的方法来实现这个导航功能,所以,才有了这篇文章,JS与C#不同,它虽然有引用类型,但它不具备一些引用类型的特性,如它的方法参数为对象时,也是通过值传递的,而不是通过内存地址,而在进行导航制作时,我们正是使用了引用类型的这个特性,所以,我们的JS方法,就不能和C#相同了,如果使用其它方式,如,使用名称保存在一个变量里。

下面是JS方式实现的导航,希望对JS朋友有些帮助

<script type="text/javascript">

        //对象实体
var BannerModel = function (name, url, id, parentID) {
return {
Name: name,
Url: url,
ID: id,
ParentID: parentID,
Parent: {}
};
}
var BannerStr = "";
var Data = [new BannerModel("首页", "/", 1, 0), new BannerModel("用户中心", "/UserInfo", 2, 1), new BannerModel("基本信息设置", "/UserInfoSet", 3, 2)];
//找老祖宗...
    function GetParent(o) {
if (o != undefined && o.ID != undefined) {
BannerStr = "<a href=" + o.Url + ">" + o.Name + "</a>" + ">" + BannerStr;
for (var i in Data) {
if (Data[i].ID == o.ParentID) {
o.Parent = Data[i];
break;
}
}
GetParent(o.Parent);
}
}
//导航工厂
var BannerFactory = {
GetTreeBanner: function (url) {
var temp = "";
BannerStr = "";
for (var i in Data) {
if (Data[i].Url == url) {
temp = Data[i];
break;
}
}
GetParent(temp);
return BannerStr;
}
}
document.write(BannerFactory.GetTreeBanner("/UserInfoSet")); </script>

看JS生成的导航截图

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXIAAAB9CAIAAAAwZ38/AAAgAElEQVR4nO2dd1hTV+PHb9c7LKC1Ak6KE3DgVhx9O97R8f7q22UdrbVDsdUktOJAHLXVtrZv27d929dqFSkiskkgQAh7CoiGFcIKeykKokwFPb8/bnK5uePcm+QyxPN9Pg/Pyc2555x7xjdnBMBGzdjOzcztj+vYwciomTtGzdrxzoQ1rQ9NfH7KOu2j9p3Y+F3W/zhl5dKJje/Ext98aMIzdhukFgs6sfF+lkssZ4ksZ4ksHXZYOogsHcT6n2ILB5GFg8jCQWzpKLJ0FFs6igEAl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fuYNgKzxXTybMJihxGF/yhM+zI90XEnK2wtk5eHYdPl3ZtJTNyVRAmTnAhJ2tmCxIUZFNPOAS5jeYTQBWpgHOGj3asMX0jow0nIT+OhwSEpLAQraChIQksJCtICEhCSxkK0hISAIL2QoSEpLAQraChIQksJCtICEhCSxkK0hISAIL2QoSEpLAQraChIQksJCtICEhCSxkK0hISAIL2QoSEpLAQraChIQksJCtICEhCaz/B2nD8ZMaB85uAAAAAElFTkSuQmCC" alt="" />

返回目录

缓存篇(Cache)~第二回 使用static静态成员实现服务器端缓存(导航面包屑)~续的更多相关文章

  1. 缓存篇(Cache)~第一回 使用static静态成员实现服务器端缓存(导航面包屑)

    返回目录 今天写缓存篇的第一篇文章,在写完目录后,得到了一些朋友的关注,这给我之后的写作带来了无穷的力量,在这里,感谢那几位伙伴,哈哈! 书归正传,今天我带来一个Static静态成员的缓存,其实它也不 ...

  2. 缓存篇(Cache)~大话开篇

    回到占占推荐博客索引 闲话杂淡 想写这篇文章很久了,但总是感觉内功还不太够,总觉得,要写这种编程领域里的心法(内功)的文章,需要有足够的实践,需要对具体领域非常了解,才能写出来.如今,感觉自己有写这种 ...

  3. 缓存篇(Cache)~第三回 HttpModule实现网页的文件级缓存

    返回目录 再写完缓存篇第一回之后,得到了很多朋友的好评和来信,所以,决定加快步伐,尽快把剩下的文章写完,本篇是第三回,主要介绍使用HttpModule实现的文件级缓存,在看本文之前,大家需要限度Htt ...

  4. 缓存篇~第七回 Redis实现基于方法签名的数据集缓存(可控更新,分布式数据缓存)

    返回目录 本篇文章可以说是第六回 Microsoft.Practices.EnterpriseLibrary.Caching实现基于方法签名的数据集缓存(可控更新,WEB端数据缓存)的续篇,事实上,有 ...

  5. 缓存篇~第六回 Microsoft.Practices.EnterpriseLibrary.Caching实现基于方法签名的数据集缓存

    返回目录 这一讲中主要是说EnterpriseLibrary企业级架构里的caching组件,它主要实现了项目缓存功能,它支持四种持久化方式,内存,文件,数据库和自定义,对于持久化不是今天讨论的重要, ...

  6. 缓存篇~第八回 Redis实现基于方法签名的数据集缓存~续(优化缓存中的key)

    返回目录 上一讲主要是说如何将数据集存储到redis服务器里,而今天主要说的是缓存里的键名,我们习惯叫它key. redis或者其它缓存组件实现的存储机制里,它将很多方法对应的数据集存储在一个公共的空 ...

  7. (转)高性能网站架构之缓存篇—Redis集群搭建

    看过 高性能网站架构之缓存篇--Redis安装配置和高性能网站架构之缓存篇--Redis使用配置端口转发 这两篇文章的,相信你已经对redis有一定的了解,并能够安装上,进行简单的使用了,但是在咱们的 ...

  8. 前端技巧:禁止浏览器static files缓存篇(转)

    前端技巧:禁止浏览器static files缓存篇 由于CSS/JS文件经常需要改动,前端调试时是不希望浏览器缓存这些文件的. 本文记录博主的经验. Meta法 目前在chrome调试还没有遇到问题, ...

  9. 第二十四篇 -- Cache学习

    Cache存储器 电脑中为高速缓冲存储器,是位于CPU和主存储器DRAM(Dynamic Random Access Memory)之间,规模较小,但速度很高的存储器,通常由SRAM(Static R ...

随机推荐

  1. angular之自定义过滤器的使用

    自定义过滤器需要使用filter函数,格式如下: filter("filterName',function(){ return function(target,args){ .... } } ...

  2. java抽象语法

    1.基本概念: 0.0.抽象类的定义:抽象类是为子类提供一个规范,其目地是由子类去继承实现(类似国家提出的法律,由我们去执行). 0.1.定义抽象类用abstract来定义. 语法: public a ...

  3. 三道关于Taylor级数的题目,证明你爹是你爹

    =============幂级数的唯一性==================

  4. chrome 浏览器 手动同步书签 && 安装离线插件

    现在查的很严,所以使用chrome浏览器 同步功能不是特别好,就算是FQ也会出现 同步延迟的情况,所以定时使用手动同步还是很靠谱的行为,就在网上找了下,借鉴下.亲测可用. 在Chrome浏览器没有一个 ...

  5. 如何判断UIPanGestureRecognizer的拖动方向

    最近做一个项目,需要用到UIPanGestureRecognizer做一个侧滑菜单,需求是不能向右侧拖动(点击按钮右滑),但可以向左侧手势拖动收回:于是需要判断拖动的方向,百度了一下,网上大部分的答案 ...

  6. HTML和XHTML的一点事儿.

    什么是 HTML? HTML 是用来描述网页的一种语言. HTML 指的是超文本标记语言 (Hyper Text Markup Language) HTML 不是一种编程语言,而是一种标记语言 (ma ...

  7. ruby使用DBI连接MySQL数据库发生异常:in `error': Can't connect to MySQL server on 'localhost' (10061) (DBI::DatabaseError)

    Ruby使用DBI连接MySQL数据库一般为: require "dbi" dbh = DBI.connect("dbi:Mysql:test:localhost&quo ...

  8. JS变量和函数的一些理解

    今日看了下JS变量的一些文章,有些感触,把自己总结的一些写出来. JS初始化的过程1.JS解释器执行代码之前,创建全局变量2.用预定义的值和函数来初始化全局对象中的属性,3.搜索函数外的var声明,创 ...

  9. 第53讲:Scala中结构类型实战详解

    今天学习了scala的结构类型,让我们看看代码 class Structural {def open() = print("A class interface opened") } ...

  10. XAF 官方问题笔记

    1.How to print report direct, and print preview via an simple action? 如何通过一个按钮直接打印报表或者打印预览报表 https:/ ...