La La la, learning js the first day, in fact, before the foundation of JS have some understanding, but always feel confused, is very distressed ah. This time I'm going to slow down, learn to learn. I wrote a small case in the morning, so I didn't tidy up much today.
JS IntroductionJS is a web programming language that runs on the client.part of JSECMAScript JS Standard (CORE)Simply put, Ecmascipt describes the following: syntax, type, statement, keyword, reserved word, operator, object. DOMmanipulating page elements via JS (Document Object model)The DOM creates a tree to represent the document, giving developers unprecedented control over the content and structure of the document. The DOM API makes it easy to delete, add, and replace nodes.
"UTF-8"></meta> < Title> head </title>
This code can be drawn as a node-level graph using the DOM:
BOM Operation Browser via API (Browser object model)
The BOM mainly deals with browser windows and frames, but usually browser-specific JavaScript extensions are considered part of the BOM. These extensions include: 1, pop-up new browser windows 2, move, close browser window and Resize window 3, provide user screen resolution think of screen object 4, support for cookies 5, IE expands the BOM, joins the ActiveXObject class, you can use JavaScript , instantiating an ActiveX objectjs Writing method Inline Type"text/kavascropt"> alert (11 ) </script>
JS between the sometimes do not need to load HTML, immediately run JS, but the user click on a Song object in Htmlz, triggering an event, only need to call JS. This time usually put JS in the HTML JS between the <body>When the browser loads the body part of the Web page, it executes the JavaScript statement and outputs the content after execution.outer chain type <script src="1.js"></script>
1, create an external JS file 2, through the SRC external JS call 3, write the JS code, the semicolon can not omit 4, the JS code is written in the HTML end tag behindJS Foundation First Day