javascript
luoxh
这个作者很懒,什么都没留下…
展开
-
inline javascript cannot have the string "</script>"
--->2nd edition Nicholas C.Zakas@14 when using inline javascript code, keep in mind that you cannot have the string "" anywhere in your code. 在中间出现的“”字符串会被解释成结束标签,从而导致错误。解决办法是把“”拆分为多个字符串,例如“”。原创 2012-02-01 10:40:48 · 203 阅读 · 0 评论 -
javascript download, parse, execute
---> Nicholas C.Zakas@chapter 1 javascript download, parse, execute原创 2012-02-01 11:11:09 · 1025 阅读 · 0 评论 -
array.splice
原文@http://www.coshima.com/2011/02/02/array-splice-in-internet-explorer/ array.splice() in Internet Explorer I finally got around to investigating an IE bug I’ve been meaning to look into. The转载 2012-02-08 11:58:17 · 351 阅读 · 0 评论 -
一道题目
var foo = { bar: function(){ return this.baz; }, baz: 1 }; alert((f = foo.bar)()); // undefined,因为此时的this指向window alert(foo.bar()); // 1转载 2012-02-06 21:42:21 · 323 阅读 · 0 评论 -
dom element
clientWidth、clientHeight、clientLeft、clientTop:包含滚动条 offsetWidth、offsetHeight、offsetLeft、offsetTop:包含边框 offsetParent scrollWidth、scrollHeight、scrollLeft、scrollTop @https://developer.mozilla.org/e原创 2012-02-07 11:03:01 · 306 阅读 · 0 评论 -
ext-2.0.2 xtemplate问题
1、指令只能包含在双引号中,换成单引号则无效 原因是ext中的正则表达式只匹配双引号,见ext-2.0.2 XTemplate.js var nameRe = /^]*?for="(.*?)"/; var ifRe = /^]*?if="(.*?)"/; var execRe = /^]*?exec="(.*?)"/; 例如: var xt = new Ext.XTempla原创 2012-02-09 21:45:41 · 763 阅读 · 0 评论 -
js零碎知识
javascript中: 类型只有6中:Null、Undefined、String、Number、Boolean、Object; 使用运算符typeof xx得到的结果必然是'null'、'undefined'、'string'、'number'、'boolean'、'object'、'function'这7个中的一个; 在转换为逻辑值是:只有undefined、null、''、0、NaN、原创 2012-02-19 23:12:23 · 258 阅读 · 0 评论