![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
chtx87_98
这个作者很懒,什么都没留下…
展开
-
js定位 location.hash
location.hash = id; 下拉菜单通过$("#" + id).slideup("normal"); 在页面上虽然闭合了但还是会占用空间,所以经常定位不准 。 原因: 经过研究是因为隐藏的height属性影响的。 解决方法: var height = $("#" + id).css("height"); $("#" + id).css("hei.原创 2012-06-16 19:50:01 · 231 阅读 · 0 评论 -
js 实现java中hashMap
/** * 参考java中HashMap * 基本上实现Map接口 * @author chitianxiang $Date: July 5, 2012 - Thursday - 11: 28 AM */ function HashMap(){ this._table = {}; this._size = 0; if (typeof HashMap._init...原创 2012-07-28 10:57:26 · 106 阅读 · 0 评论 -
给数组对象添加contains方法:是否包某一对象
//数组是否存在某一对象 Array.prototype.contains = function(obj) { this.obj = obj; var that = this; function isExist() { for (var i = 0, j = that.length; i < j; i++)...原创 2012-04-15 21:39:26 · 355 阅读 · 0 评论