博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  JavaScript

摘要:<script type="text/javascript"> function HashTable() { this._hashtable = {}; if (typeof (_hashtable_initialized) == "undefined") { HashTable.prototype.Add = function(key, value) { if (key in this._hashtable) { return false; } this._hashtable[key] = value; return true; } Has 阅读全文

posted @ 2011-04-26 21:24 Adam哥 阅读(415) 评论(0) 推荐(0)

摘要:jquery each循环,要实现break和continue的功能:break----用return false;continue --用return ture; 阅读全文

posted @ 2011-03-11 14:47 Adam哥 阅读(60414) 评论(4) 推荐(9)

摘要:var txb = document.getElementById(inputId); txb.focus(); var t = txb.createTextRange(); t.moveStart('character', inputVal.length); t.collapse(true); t.select(); 阅读全文

posted @ 2011-03-10 14:13 Adam哥 阅读(216) 评论(0) 推荐(0)

摘要:JQGrid的数字千分位格式化定义在语言包中,可以在语言包中设置 阅读全文

posted @ 2010-12-28 10:37 Adam哥 阅读(602) 评论(0) 推荐(0)

摘要:浏览器“后退”按纽的JS事件:window.onbeforeunload 阅读全文

posted @ 2010-12-19 14:38 Adam哥 阅读(725) 评论(0) 推荐(0)

摘要:保存单值Cookie: HttpCookie SingelValueCookie=new HttpCookie("test1","单值Cookie"); SingleValueCookie.Expires=DateTime.Now.AddDays(1); Response.Cookies.Add(SingleValueCookie); 等价于: HttpCookie SingleValueCoo... 阅读全文

posted @ 2010-11-29 20:08 Adam哥 阅读(2047) 评论(0) 推荐(0)

摘要:document.cookie 阅读全文

posted @ 2010-11-19 11:22 Adam哥 阅读(1283) 评论(0) 推荐(0)

摘要:判断对象是否符合表达式,返回boolen值HTML 代码:jQuery 代码:结果: 阅读全文

posted @ 2010-09-28 10:45 Adam哥 阅读(331) 评论(0) 推荐(0)

摘要:经过Css的各种hack,Dom结构的各种变化,最终还是对各种的浏览器无语了。于是乎只能针对不同的浏览器做不同的处理了。下面是浏览器类型的客户端及服务器判断:Js的客户端浏览器类型判断:<script type="text/javascript"> function getBrowser() { if (navigator.userAgent.indexOf("MSIE 6") >... 阅读全文

posted @ 2010-08-30 13:51 Adam哥 阅读(1262) 评论(0) 推荐(0)

摘要:Extjs中获取当前元素的父元素方法,通过元素的el属性,如下:this.el.parent() 阅读全文

posted @ 2010-08-16 10:00 Adam哥 阅读(2215) 评论(0) 推荐(0)

counter