摘要:
position属性的合法值有static、fixed、relative和absolue四种。static是position属性的默认值,意思是有关元素将按照它们在标记里出现的先后顺序出现在浏览器窗口里。relative的含义鱼static相似,区别是position属性等于relative的元素还... 阅读全文
摘要:
把一个非常具体的东西改进为一个较为通用的东西的过程叫做抽象先看下styleHeaderSibling函数,会发现它仅适用于h1元素,而且className属性值intro也是硬编码在函数里的:function styleHeaderSibling(){ var headers=document... 阅读全文
摘要:
function addClass(element,value){ if(!element.className){ element.className = value; }else{ element.className += ' '+ value; //必须... 阅读全文
摘要:
function highLightRows(){ var rows=document.getElementsByTagName('tr'); for(var i=0;i<rows.length;i++){ rows[i].onmouseover=function(){ ... 阅读全文
摘要:
Cities Itinerary WhenWhere June 9thPortland,OR June 10thSeattle,WA June... 阅读全文
摘要:
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... 阅读全文
摘要:
ExampleAn example of a paragraph事实证明:element.style将返回一个对象,样式都存放在这个style对象的属性里。不仅文档里的每个元素都是一个对象,每个元素都有一个style属性,他们也是一个对象。解析:Javascript将把减号前面的内容解释为"元素的s... 阅读全文
摘要:
explaining Home Search ContactWhat is the Document Object ModelThe W3C defines the DOM as:A platform- and language-neutral interface that wil... 阅读全文
摘要:
explainingWhat is the Document Object ModelThe W3C defines the DOM as:A platform- and language-neutral interface that will allow programs and scripts ... 阅读全文
摘要:
explainingWhat is the Document Object ModelThe W3C defines the DOM as:A platform- and language-neutral interface that will allow programs and scripts ... 阅读全文