JAVASCRIPT HashTable_javascript技巧_脚本之家

作者:官方彩票手机投注网站-服务器运维

functionHashtable() { this._hash=newObject(); this.add=function{ if!="undefined"){ if==false){ this._hash[key]=typeof=="undefined"?null:value; returntrue; }else{ returnfalse; } }else{ returnfalse; } } this.remove=function{deletethis._hash[key];} this.count=function(){vari=0;for{i++;}returni;} this.items=function{returnthis._hash[key];} this.contains=function{returntypeof!="undefined";} this.clear=function(){for{deletethis._hash[k];}} } vara=newHashtable; a.add; a.add; a.remove; alert; alert; alert; alert;

本文由彩票投注软件发布,转载请注明来源

关键词: