1-JavaScript Overview (Note

JavaScript Overview

First, what JavaScript is the? What is the use

JS is a powerful scripting language on the web

Scripting language: Unable to perform independent, must be embedded into other languages, used in conjunction

Is parsed directly executed browser

Role: Control page effects show

JS may be dynamically controlled HTML elements

JS table item can be verified

JS CSS styles can be controlled


Second, the JavaScript language features and programming considerations

1, wherein

Javascript without compiling, direct your browser to be interpreted and executed

Javascript can not run alone, you must be embedded into the HTML code to run ·

Javascript execution process is performed successively from top to bottom

2 Notes

Javascript does not have permission (secure) access system files *

Because no need Javascript compiler, is from top to bottom in order to explain the implementation, so ensuring the readability of the case, allowing the use of chain programming

Javascript and java does not have any direct relationship


Three, JavaScript composition

ECMAScript:

It specifies the syntax and basic object of JS

JUDGMENT:

Document Object Model:Processing web contentMethods and interfaces

Mark the document type: HTML

GOOD:

Browser object model: andBrowser interactionMethods and interfaces


Four, JavaScript way of introduction

1, internal Screenplay

在当前页面内写<script></script>中
可以放置在任意位置

2, introduced from the outside (with more)

In HTML, by <script src="">introducing the label .jsfile

After the introduction of external, internal label not write code js

3, script tag placement standardization

Before the end of the label on the body

Pros: display HTML content holding priority load, last load script


Published 35 original articles · won praise 1 · views 1836

Guess you like

Origin blog.csdn.net/qq_40672635/article/details/104969407