telerik 控件 SCRIPT5007: 无法获取未定义或 null 引用的属性“documentElement” (IE 文档模式)
摘要:IE对盒模型的渲染在 Standards Mode和Quirks Mode是有很大差别的,在Standards Mode下对于盒模型的解释和其他的标准浏览器是一样,但在Quirks Mode模式下则有很大差别,而在不声明Doctype的情况下,IE默认又是Quirks Mode。所以为兼容性考虑,我...
阅读全文
posted @
2014-06-27 14:02
极简
阅读(2065)
推荐(0) 编辑
isotope/masonry 使用jQuery.sortable
摘要:1 function goMasonry() { 2 // if ($container.data('masonry') != undefined) { 3 $container.isotope('destroy'...
阅读全文
posted @
2014-06-27 13:57
极简
阅读(394)
推荐(0) 编辑
javascript this对象 作用域链scope chain
摘要:【作用域】var tt = 'aa';test(); //先调用后再定义function test(){alert(tt); //undefinedvar tt = 'dd';alert(tt); //dd}函数在定义它们的作用域里运行,而不是在执行它们的作用域里运行。调用对象位于作用域链的前端,局部变量(在函数内部用var声明的变量)、函数参数及Arguments对象都在函数内的作用域中——这意味着它们隐藏了作用域链更上层的任何同名的属性。未使用var关键字定义的变量都是全局变量<script type="text/javascript&quo
阅读全文
posted @
2012-11-10 22:58
极简
阅读(353)
推荐(0) 编辑
JavaScript function与arguments
摘要:【function定义】A.function alertArgsCount(){ alert("函数调用时的参数个数:"+arguments.length);}B.var funBody="if(a>b) return a-b; else return b-a;"var getDiffValue=new Function("a","b",funBody);alert(getDiffValue(12,125));alert("函数定义时的参数个数为:"+getDiffValue.length
阅读全文
posted @
2010-11-14 17:44
极简
阅读(378)
推荐(0) 编辑
JavaScript 对象封装(完美版)
摘要://Apple构造函数function Apple(color,weight,home) { //设置属性的值 this.color=color; this.weight=weight; this.home=home; this.price = new Array(12,15); //[12,15]; if(typeof Apple.created == "undefined") { //添加一个方法 这种方法 确保 定义的方法 只构造一次 而不会每次实例化都定义一次 Apple.prototype.showHome=funct...
阅读全文
posted @
2010-11-14 17:34
极简
阅读(281)
推荐(0) 编辑