JS Foundation First Day

Source: Internet
Author: User

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 behind

JS Foundation First Day

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.