02 2013 档案
摘要:转:http://www.ruanyifeng.com/blog/2012/05/responsive_web_design.html
阅读全文
摘要:function getElementsByAttribute(attribute, attributeValue){ var elementArray = new Array(); var matchedArray = new Array(); if (document.all) { elementArray = document.all; } else { elementArray = document.getElementsByTagName("*"); } for (var i = 0; i < elementArray.length; i++) { ...
阅读全文
摘要:class和className兼容方法:object.setAttribute("class","content")在IE8、Chrome、火狐、Opera10中都能设置成功;但是在IE7下无法设置。object.setAttribute("className","content")只有IE7能设置成功,但是其他浏览器均无法设置。兼容方法:使用object.className="content"style和cssText兼容方法:object.setAttribute("style&q
阅读全文
摘要:function stopPro(e) { if (e && e.stopPropagation) { //W3C取消冒泡事件 e.stopPropagation(); } else { //IE取消冒泡事件 window.event.cancelBubble = true; } };
阅读全文