摘要:
1.jQuery is far and away the most popular DOM libraryUsed to allow modification and control of the DOMAmore uniform way of interacting with the DOM2.A... 阅读全文
摘要:
1.Scope=variable visibilitya variable’s scope is the part of your code that can access and modify that variable.JavaScript has function scopeGlobal variables — that is, variables that can be read and modified anywhere in your applicationit’s best to limit the scope of a variable as much as possible, 阅读全文
摘要:
1. JSON(JavaScript Object Notation)A set of text formatting rules for storing and transferring data in a machine and human readable way.The object literal syntax of JavaScriptA totally different language2.Use JSONconverts an object into a JSON stringjsonString becomes {"make": "McLare 阅读全文
摘要:
1.load new content into a page without a full reloadXML HTTP Request (XHR) To retrieve new content for a pageAJAX standing for Asynchronous JavaScript and XML.2.XML HTTP Requestcreate a new XMLHttpRequest requestspecify a callback functionspecify a callback function(specify a callback function,URL t 阅读全文
摘要:
event-driven :waiting for and reacting to events2.page loads, user interacts (clicks, hovers, changes),triggered manually3.A group of the things needed to listen for an event; the callback function, an element and the call to listen for an event:addEventListener is a method found on all DOM elements 阅读全文
摘要:
1.DOM(The Document Object Model)Away to manipulate the structure and style of an HTML page.It represents the internals of the page as the browser sees it, and allows the developer to alter it with JavaScript.2.HTML is an XML-like structureTo access the DOM from JavaScript, the document object is use 阅读全文
摘要:
1.Lists of any kind of data2.Index to retreve an element from the array 03.[].length;.pop()/push(' ');=remove/add elements from the end of the array 阅读全文
摘要:
1.Real life object:propertiese & abilitiesJS object:a collection of named properties & methods=functionvariables hold objectsdot syntax access properties & methods .2.nested object 阅读全文
摘要:
1.Function=Reusable blocks of codePassed arguments & return a valuesave functions as the value of a variablecall a function using this variable & a pair of parentheses=invoking 阅读全文
摘要:
1.numberoperator () * / + -2.logic make decisions in codecompare values to produce a boolean value===(同类型) !== > = <=3.Conditionalif else//注释 indicate commentIf some logic(the contion)is true,run a {block} of codeCondition is not true ,ignore if block ,only the else block will be runUsed to ru 阅读全文
摘要:
1.Variablesname :name it in a way that tells what you've stored therevalue:2.Create a variable => assign/set its valuedeclaration & initialization3.DeclarationDeclaring a variable to existPicking an empty shelf in a massive warehouse and putting a name on it.var variableName;4.Initializat 阅读全文
摘要:
1.JS(JavaScript) is for interactivity2.How does JS relate to HTML&CSS?script tagscript element contain JS interal & external3.Internal4.External5.alert(" ");var **=prompt(' '); 阅读全文
摘要:
1.Layout with CSS is easy. You just take a chunk of your page and shove it wherever you choose2.position property3.static valuerenders a box in the normal order of things4.relativemuch like static but the box can be offset from its original positiontop/right/bottom/left properties5.absolutepulls a b 阅读全文
摘要:
1.selector:pseudo element{property:value;}2.first-letter first-lineCSS3:: 与pseudo class 区别 old browser not do well3.before afterproperty=content4. 阅读全文
摘要:
1display :inline/block/none2.inline valueCause all list items in a list to appear next to each other in one continuous linerather than each one having its own line.3.BlockMake a box standalone,fitting the entire width of its containing box,with an effectve line break before and after it.4.inline-blo 阅读全文
摘要:
1.More Specific=Greater Precedence =>nested selectors2. the selectors are the same then the last one will always take precedence3.Calculating SpecificityID Selector =100class Selector=10HTML Selector=1 阅读全文
摘要:
1.background:background-colorurl-background-imagebackground-repeat(repeat/repeat-y/repeat-x/no-repeat)background-position(top/center/bottom/left/right(combination/length/percentage)background-attachment(sroll(default)/fixed)2.egbackground:white url(http://) no-repeat fixe top right 阅读全文
摘要:
1.Margins and Paddingproperty: top right bottom left;property: top/bottom right/left;2.Borderborder(-top/right):border-width,border-style,border-color;3.Fontfont:font-style(inherit/normal/italic/oblique),font-weight(inherit/normal400/bolder/bold700/lighter/100~900,font-size(inherit/[percentage]/[len 阅读全文