JS HashTable
来源:互联网 发布:ubuntu 卸载mongodb 编辑:程序博客网 时间:2024/05/22 15:06
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JS HashTable</title>
</head>
<script language="javascript" type="text/javascript">
function Hashtable()
{
this._hash = new Object();
this.add = function(key,value){
if(typeof(key)!="undefined"){
if(this.contains(key)==false){
this._hash[key]=typeof(value)=="undefined"?null:value;
return true;
}else{
return false;
}
}else {
return false;
}
}
this.remove = function(key){delete this._hash[key];}
this.count = function(){var i=0;for(var k in this._hash){i++;} return i;}
this.items = function(key){return this._hash[key];}
this.contains = function(key){ return typeof(this._hash[key])!="undefined";}
this.clear = function(){for(var k in this._hash){delete this._hash[k];}}
}
var a = new Hashtable();
a.add("1");
a.add("1");
a.add("3");
a.remove("4");
alert(a.contains("5"));
alert(a.contains("2"));
</script>
<body>
</body>
</html>
- JS HashTable
- js hashTable
- js hashtable
- js中Hashtable问题
- JS版Hashtable
- js写的Hashtable类
- 在JS中使用哈希表(hashTable)
- 在JS中使用hashTable(哈希表)
- 在JS中使用哈希表(hashTable)
- 【JavaScript】在JS中使用哈希表(hashTable)
- 类似Java Hashtable的Js集合类
- 在JS中使用哈希表(hashTable)
- HashTable
- Hashtable
- HashTable
- hashtable
- Hashtable
- HashTable
- 区分 inheritance of interface(接口继承)和 inheritance of implementation(实现继承)
- 解决Ubuntu下ADSL频繁掉线问题
- 收到Borland寄来的C++Builder2007 Trial版光盘
- Ubuntu使用手记
- spring中对hibernate的支持是非常强大的,从一个简单的例子就看得出来,从这个例子中我们还将对所谓的轻量级容器做一些讨论。
- JS HashTable
- GridView记录删除前的确认窗口
- 希望与欲望
- hibernate 保存大字段数据到数据库(sqlserver)
- 使用jdbc保存大字段到数据库(sqlserver)
- 自己最近的状态---忙却迷茫中
- .net中error LNK2005: MSVCRTD.lib重复定义问题
- ABAP--如何使用REUSE_ALV_GRID_DISPLAY函数删除内表数据(样例代码,感谢依风提供)
- 很酷的.Net技巧(二)