02 2012 档案

摘要:IE Trident 'traidəntFIREFOX gecko ['ɡekəu]Opera presto chrome Safari Webkit 阅读全文
posted @ 2012-02-22 14:40 wuhao12 阅读(249) 评论(0) 推荐(0)
摘要:1.CSS Hackpadding:9px\9; /* all ie */padding:8px\0; /* ie8-9 目前应用于IE8的单独hack,情况比较少 */*padding:5px; /* ie6-7 */+padding:7px; /* ie7 */_padding:6px; /* ie6 */ 2.条件注释CSS文件3.条件注释<html> 阅读全文
posted @ 2012-02-19 20:45 wuhao12 阅读(175) 评论(0) 推荐(0)
摘要:HTML实体编号&#38646;&#x96f6;JS实体编码 String("\u96f6")->零String.fromCodeChar(38646)->零String.fromCodeChar(96f6)->零显示说明实体名称实体编号Js转义Js转义encodeURIcomponent不断行的空白格&nbsp;&#160;%20<小于&lt;&#60;, &#x3C;%3C>大于&gt;&#62;%3E&&符号&amp;&#38;&quo 阅读全文
posted @ 2012-02-18 13:46 wuhao12 阅读(337) 评论(0) 推荐(0)
摘要:getElementByIdgetElementsByNamecreateElementcreateTextNodegetElementsByTagNamechildNodesparentNodenextSiblingpreviousSiblingfirstChildlastChildappenChildinsertBeforeremoveChildreplaceChild(newNode, oldNode)cloneNode(include_all)hasChildnodesgetAttributesetAttributeremoveAttributenodeName 属性含有某个节点的名称 阅读全文
posted @ 2012-02-17 21:29 wuhao12 阅读(201) 评论(0) 推荐(0)
摘要:字符串对象1.stringObject.substring(start,stop) 参数非负返回数据2.stringObject.substr(start,length) 从start向右取length个,start=-1表示最后一个返回数据3.stringObject.split(separator,howmany) 返回数据separator 必需。字符串或正则表达式,从该参数指定的地方分割 stringObject。为""时,表示按字符拆分howmany 可选。该参数可指定返回的数组的最大长度4.stringObject.slice(start,end) start& 阅读全文
posted @ 2012-02-14 23:24 wuhao12 阅读(487) 评论(0) 推荐(0)
摘要:函数作用链对象原形属性(通过构造器的prototype属性实现原型继承)变量的出处(局部变量,作用域链(父函数,全局),原型对象,函数作用的对象) 阅读全文
posted @ 2012-02-09 23:08 wuhao12 阅读(201) 评论(0) 推荐(0)
摘要:1. type:事件的类型,如click; 2. srcElement/target:事件源; 3. button:声明被按下的鼠标键,整数,1代表左键,2代表右键,4代表中键,如果按下多个键,把这些值加起来,所以3就代表左右键同时按下; (firefox中 0代表左键,1代表中间键,2代表右键) 4. clientX/clientY:鼠标相对于浏览器窗口可视文档区域的左上角的位置 5. offsetX,offsetY/layerX,layerY:事件发生的时候,鼠标相对于源元素左上角的位置(包括边框及滚动距离); 6. X,Y,相对于定位元素,看总结部分,pageX,pageY:相... 阅读全文
posted @ 2012-02-03 23:49 wuhao12 阅读(249) 评论(0) 推荐(0)
摘要:setTimeout有两种形式 setTimeout(code,interval) setTimeout(func,interval,args) 其中code是一个由JS语句构成的字符串,其中的语句依赖的上下文是window. func是一个函数. function outer(){ setTimeout((function(self){ return function(){alert(self.a)} }(this)),1000); } 阅读全文
posted @ 2012-02-01 12:50 wuhao12 阅读(205) 评论(0) 推荐(0)