您的位置:首页 > Web前端 > JavaScript

JS实现的HashTable类来记录删除的记录的ID跟Name

2008-05-19 23:25 330 查看
Array.prototype.Add = function (value)

19

23//----------------- Hashtable Start -----------------

24//利用二维数组实现Hashtable

25function Hashtable()

26//Add

30//Hashtable.prototype.Add = function(key, sValue,status)

31//arguments可以传入可变量参数(lhz)

32Hashtable.prototype.Add = function()

33

61//Remove

62Hashtable.prototype.Remove = function(key)

63

81//Get

82Hashtable.prototype.GetValue = function(key)

83//Set

97Hashtable.prototype.SetValue = function(key,value)

98//GetKey

111Hashtable.prototype.GetKey = function()

112//Count

123Hashtable.prototype.Count = function()

124//Items

128Hashtable.prototype.Items = function()

129//ToKeyString

133Hashtable.prototype.ToKeyString = function()

134//ToValueString

138Hashtable.prototype.ToValueString = function()

139//ToStatusString

143Hashtable.prototype.ToStatusString = function()

144//通过索引获取String

148Hashtable.prototype.ToStringByIndex = function(index)

149//------------------------ Hashtable End ---------------------
调用方法如下:

1<script type="text/javascript" src="/JS/HashTable15.js"></script>

2<script type="text/javascript">

3 var selectedIDList = new Hashtable();

4

5 function CheckBoxOnClick(obj,id,name)

6 function SubmitForm()

19</script>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: