摘要: 把一个非常具体的东西改进为一个较为通用的东西的过程叫做抽象先看下styleHeaderSibling函数,会发现它仅适用于h1元素,而且className属性值intro也是硬编码在函数里的:function styleHeaderSibling(){ var headers=document... 阅读全文
posted @ 2014-04-21 21:27 Western Journey 阅读(144) 评论(0) 推荐(0) 编辑
摘要: function addClass(element,value){ if(!element.className){ element.className = value; }else{ element.className += ' '+ value; //必须... 阅读全文
posted @ 2014-04-21 21:10 Western Journey 阅读(178) 评论(0) 推荐(0) 编辑
摘要: function highLightRows(){ var rows=document.getElementsByTagName('tr'); for(var i=0;i<rows.length;i++){ rows[i].onmouseover=function(){ ... 阅读全文
posted @ 2014-04-21 17:21 Western Journey 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Cities Itinerary WhenWhere June 9thPortland,OR June 10thSeattle,WA June... 阅读全文
posted @ 2014-04-21 16:49 Western Journey 阅读(454) 评论(0) 推荐(0) 编辑
摘要: Man bites dogHold the front pageThis first paragraph leads you in.Now you get the nitty-gritty of the storyThe most important information is delivered... 阅读全文
posted @ 2014-04-21 10:17 Western Journey 阅读(182) 评论(0) 推荐(0) 编辑