Learning web front-end Three-day summary and results

小白学习web front end Three-day summary and results js

javascript brief introduction ECMAScript     Grammar     2. Variable: can only be defined using var. If the content of the function is defined using var, then it is a local variable. If it is not used, it is a global one. Weak type!     3. Data type: raw data type (undefined/null/string/number/boolean)     4. Statement:     5. Operator: the difference between == and ===     6. Function: two ways to write (named, anonymous)

BOM object     Window:alert(),prompt(),confirm(),setInterval(),clearInterval(),setTimeout(),clearTimeout()     History:go (parameter), back(), forward()     Location: href attribute

Event:     Onsubmit() This event is written in the form tag and must have a return value.     Onload() This event can only be written once and placed in the body tag     Other events are placed at the location of the element that needs to be manipulated. (onclick, onfocus, onblur)

Get the element:     document.getElementById("id") Get the value inside the element (user gave):     document.getElementById("id").value

output to the page     Pop-up window: alert();⋯⋯     Write content to the browser: document.write (content);     Write content to the specified location of the page, innerHTML