Preliminary understanding of JavaScript

Source: Internet
Author: User

Learning Goals
>> Understanding JavaScript Components
>> three major components
>> Understanding JavaScript parsing mechanism
>> sequential parsing, edge parsing edge execution
>> How to use JavaScript
>> <script></script>
————————————————————————————
What is JavaScript
>>javascript is a scripting language designed for Web page interaction

________________________________________________________

What are the three parts of JavaScript?
>>ecmscript (ECMA-262) provides core language features
>> text Object Model (DOM) provides methods and interfaces for accessing and manipulating Web page content
>> Browser Object Model (BOM) provides methods and interfaces for browser interaction

_________________________________________________________

Helloworld.javascript

<script type= "Text/javascript" chartset= "Utf-8" >
The effect is a pop-up alert box with the message (browser object model) that shows the alter
Window.alter (' helloworld! ' My frist javascriptpage);
Document Object
document.write (' My first JavaScript program ');
Print to console
Console.info (' HelloWorld ');
</script>

__________________________________________________________

Comments for JavaScript
>>//
>> <!--
Content
-

<!--external introduction of files--
<script type= "Text/javascript" chartset= "Utf-8" src= "external path uri" ></script>

JavaScript executes in order from top to bottom, from outside to inside (parsing external files first)

You can also use defer critical delay execution, the entire interface is loaded after the execution, defer= "defer" equivalent to Window.onload

Preliminary understanding of JavaScript

Related Article

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.