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