JS Mapping
来源:互联网 发布:检测移动硬盘的软件 编辑:程序博客网 时间:2024/05/01 03:38
//ltt add mapping 20081220 design by lttfunction Mapping(){ this.key = new Array(); this.value = new Array(); this.type = 'LTTMapping'; /* this.keys = function () { return key; } ; this.values = function () { return value; } ; */} Mapping.prototype.push = function(key,value) { if (key != null && key != 'undefined' && value != null && value != 'undefined') { var i=this.findIndexByKey(key); if(i!=-1) { this.value[i]=value; } else { this.key.push(key); this.value.push(value); } }} Mapping.prototype.findIndexByKey = function(key) { if (key != null && key != 'undefined') { for(var i=0;i<this.key.length;i++) { if(this.key[i]==key)return i; } } return -1;} Mapping.prototype.getValue = function(key) { for(var i=0;i<this.key.length;i++) { if(this.key[i]==key)return this.value[i]; } return null;} Mapping.prototype.exist = function(key){ if (key != null && key != 'undefined') { for(var i=0;i<this.key.length;i++) { if(this.key[i]==key)return true; } } return false;} Mapping.prototype.size = function () { return this.key.length;} Mapping.prototype.reset = function(key) { this.key=[]; this.value=[];}//ltt add 可能会出问题Mapping.prototype.remove = function (key) {var index = this.findIndexByKey(key); if (index != - 1 ) { var tempKey = new Array(); var tempEntry = new Array(); for ( var i = this.key.length;i > 0 ;i -- ) { if (i != (index + 1 )) { tempKey.push( this.key.pop()); tempEntry.push( this.value.pop()); } else { this.key.pop(); this.value.pop(); } } for ( var i = tempKey.length;i > 0 ;i -- ) { this.key.push(tempKey.pop()); this.value.push(tempEntry.pop()); } } }
- JS Mapping
- Knockout.js学习之mapping插件使用
- Mapping
- Mapping
- Mapping
- No mapping found for HTTP request with URI [/operation-platform/js/displaytag.js] in DispatcherServl
- <mvc:resources mapping="/js/**" location="/js/**"/> <script type="text/javascript" src="<%=reques
- No mapping found for HTTP request with URI [/SuperPowerfulProject/js/jquery.dataTables.js等静态资源加载
- SSM报错:No mapping found for HTTP request with URI [/smbms/js/echarts.js] in DispatcherServlet with na
- Cube Mapping
- Light Mapping
- Distance mapping
- Parallax Mapping
- Mapping File
- mind-mapping
- Mind Mapping
- file mapping
- rails mapping
- .ani动态鼠标指针图像无法显示
- java反射详解
- Java 文件上传(原理)
- 连通图的割点、割边(桥)、块、缩点,有向图的强连通分量
- struts2 一
- JS Mapping
- c和python利用setsockopt获得端口重用
- C codes for VirginiaJ
- jsp参数传递的方法
- 【转】.NET Framework各版本比较
- AOP
- Cannot create a session after the response has been committed
- 创意loading设计
- oracle锁机制