Ruby's Louvre

每天学习一点点算法

导航

上一页 1 ··· 104 105 106 107 108 109 110 111 112 ··· 125 下一页

2009年12月14日 #

jQuery在去除缓存数据的一个失误

摘要: 如果独自放着jQuery做事,它绝对做得很好,但jQuery充许与其他库共存在,有些事就防不胜防了。看下面代码,data :function (elem, name,data){ //略},removeData: function (elem, name) { elem = elem == window ? windowData : elem; var id = elem[expando]; //... 阅读全文

posted @ 2009-12-14 13:45 司徒正美 阅读(3833) 评论(5) 推荐(1) 编辑

javascript 动态插入技术

摘要: 最近发现各大类库都能利用div.innerHTML=HTML片断来生成节点元素,再把它们插入到目标元素的各个位置上。这东西实际上就是insertAdjacentHTML,但是IE可恶的innerHTML把这优势变成劣势。首先innerHTML会把里面的某些位置的空白去掉,见下面运行框的结果: <!doctype html><html dir="ltr" lang="zh-CN"&... 阅读全文

posted @ 2009-12-14 08:02 司徒正美 阅读(11269) 评论(17) 推荐(3) 编辑

2009年12月10日 #

透明度设置

摘要: IE在处理透明度上真够恶心,而且在IE7必须让元素的hasLayout为ture,要不会失效。以下是我最新处理透明度的代码: var getIEOpacity = function(el){ var op = 1; //这是最快的获取IE透明值的方式,不用正则来处理字符串了! if(el.filters.alpha){ op = el.filters.alpha.opacity; }else if... 阅读全文

posted @ 2009-12-10 17:32 司徒正美 阅读(1968) 评论(0) 推荐(4) 编辑

2009年12月9日 #

利用mergeAttributes设置name属性

摘要: 在国外一博客看到的技巧,终于解决IE的这个老大难问题。我在IE的setAttribute bug也提到其解决方法,一是innerHTML,一是IE特别的creatElement使用方法,不过都是要求在生成DOM时一同搞定name属性,这种在DOM生成后再修改name属性的方法真是高明啊。介绍一下mergeAttributes 方法。它有两个参数oSource与 bPreserve : mergeA... 阅读全文

posted @ 2009-12-09 18:04 司徒正美 阅读(2606) 评论(7) 推荐(2) 编辑

This Week in HTML 5 – Episode 7

摘要: clickjacking.Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in the WHATWG and W3C HTML Working Group. Work continued this week ... 阅读全文

posted @ 2009-12-09 11:25 司徒正美 阅读(793) 评论(0) 推荐(0) 编辑

This Week in HTML 5 – Episode 6

摘要: multimedia accessibility, Ogg Theora, and the year 2022.Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in the WHATWG and W3C HTML Working Group. There is no big news this week. Work continued on last week's org 阅读全文

posted @ 2009-12-09 11:23 司徒正美 阅读(552) 评论(0) 推荐(0) 编辑

This Week in HTML 5 – Episode 5

摘要: XSLT, MathML, Web Forms 2, and some light reading on character encoding. Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in the ... 阅读全文

posted @ 2009-12-09 11:21 司徒正美 阅读(593) 评论(0) 推荐(0) 编辑

This Week in HTML 5 – Episode 4

摘要: the W3C’s HTML 5 validator, SVG-in-HTML, and the proper way to provide alternate text for Rorschach inkblots.Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in th... 阅读全文

posted @ 2009-12-09 11:21 司徒正美 阅读(548) 评论(0) 推荐(0) 编辑

This Week in HTML 5 – Episode 3

摘要: the event loop, the onhashchange event, and content sniffing for SVG images. Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in t... 阅读全文

posted @ 2009-12-09 11:14 司徒正美 阅读(577) 评论(0) 推荐(0) 编辑

This Week in HTML 5 – Episode 2

摘要: the window.navigator object, meta http-equiv=”Content-Language”, the Worker object, outerHTML, insertAdjacentHTML(), and the continuing saga of the alt attribute.Welcome back to "This Week in HTML 5,"... 阅读全文

posted @ 2009-12-09 11:11 司徒正美 阅读(612) 评论(0) 推荐(0) 编辑

上一页 1 ··· 104 105 106 107 108 109 110 111 112 ··· 125 下一页