
JavaScript
treeroot
爱好围棋,热爱生活
展开
-
我真是服了JavaScript了
一个window.open问题搞了我一个下午。我用这个方法 window.open("index.jsp","","width=250,height=200")窗口大小死活不是我设置那样,最后把单引号去了才OK了。window.open("index.jsp","","width=250,height=200"),在IE6.0下玩的。平时JavaScript不是很宽松的吗?这里为什么不原创 2004-09-20 17:20:00 · 1694 阅读 · 2 评论 -
一个排序的Map
这里就是一个有序的映射,本来应该做一个哈希表,实在对javascript没有什么了解,只能凑合着用这个了。查找的复杂度为log(n)//列表节点function Entry(key,value){ this.key=key; this.value=value;}//有序的映射function SortedMap(capacity,autoIncrease){ this.capaci原创 2004-10-11 21:17:00 · 1473 阅读 · 3 评论 -
一个相当不错的地区代码级联实现
我不想多说什么,只想把这个提供给大家也给自己,客户端级连菜单如果数据量很大你必须考虑效率问题!! 这里不支持JavaScript,把下面的代码放在一个文件,存为htm就行了。function ListBoxItem(value, label, depend){ this.value = value; this.label = label; //下面这个在这里无用! th原创 2004-12-28 19:05:00 · 11068 阅读 · 0 评论 -
javascript函数库:core.js
/**core.jsversion 1.2author treerootsince 2005-5-24*///ObjectObject.prototype.getClass=function(){ //var s=Object.prototype.toString.apply(this); //return s.match(//[object (/w+)/]/)[1]; //just wor原创 2005-05-24 14:56:00 · 4615 阅读 · 0 评论 -
javascript函数库:集合框架
/**collection.jsversion 1.2author treerootsince 2005-5-24Classes:CollectionsArraysArrayListSortedList extends ArrayListHashMapHashSet*//****************CollectionsNOTE:sort() return a new List*****原创 2005-05-24 14:58:00 · 6334 阅读 · 1 评论