1. Course Introduction
2.Javascript Introduction
Introduction to 3.JAVASCRIPT development tools
4. The first JavaScript program (hello! )
basic syntax for 5.Javascript (1)
Why you should learn JavaScript
Javascript is the cornerstone of Web page dynamic effect , plays an important role in web development, and is widely used in various fields.
① Web Game (qq stealing vegetables)
② map Search ( Baidu map magnification and small )
③ Stock Market Information (update stock market curve)
④web Chat (on the web version)
Mouse response, keyboard monitoring all need to use JavaScript
Verify that the user name entered is correct and requires JavaScript
In Web development,JS is an essential technology, and JS is also Ajax/jquery/extjs The basis of such frameworks
Javascrip Basic Syntax
Javascrip Object-oriented programming
BOM and Dom programming
Regular expressions
Javascript Introduction
Javascript is a scripting language widely used in client-side Web development, often used to Add dynamic functionality to HTML pages, such as responding to user actions.
What is a scripting language
The ① scripting language is between programming languages such as HTML and c,c++,java,c# (often cannot be used independently and needs to be used in conjunction with other languages, and html/jsp/php/ Asp/asp.net with the use)
The ② scripting language has its own variables, functions, control statements (order, branching, looping), and the biggest difference from programming languages is that the syntax and rules of a programming language are stricter and more complex.
The ③ scripting language is an explanatory language (that is, executing directly on the source code at execution time) such as Python,VBScript,javascript And so on is the scripting language, it is not like c\c++ , etc. can be compiled into binary code, in the form of executable files exist.
④ scripting languages generally have a corresponding scripting engine to interpret execution, and JavaScript 's scripting engine is the browser.
Java Program: java->. CLASS->JVM js-> Browser (js engine to interpret execution)
Js Latest version is 1.8
The majority of Js is executed at the client. "schematic"
Information obtained by HttpWatch in IE browser capture:
HTML Text code:
<HTML><Head><!--<script> tags are used to define client-side scripting, such as JavaScript. The script element can contain either a scripting statement or an external script file through the SRC attribute. The required Type property specifies the MIME type of the script. Common applications for JavaScript are image manipulation, form validation, and dynamic content updates. -<Scripttype= "Text/javascript"> functionTest () {Window.alert ("Hello world!"); }</Script></Head><Body><inputtype= "button"onclick= "Test ()"value= "Tap"></Body></HTML>
To run the browser effect:
First time visit:
296 Bytes sent to 127.0.0.1:8080
Get/ustc/js18-1.html http/1.1accept:text/html, Application/xhtml+xml, */* X-httpwatch-rid: 18929-10010accept-language:zh-cnuser-agent:mozilla/5.0 (Windows NT 6.1; trident/7.0; rv:11.0) like Geckoaccept-encoding:gzip, Deflatehost:localhost:8080dnt:1connection:keep-alive
670 bytes received by 127.0.0.1:1817
http/1.1 okserver:apache-coyote/1.1accept-ranges:bytesetag:w/"444-1431921729532" Last-modified:mon, 04:02:09 gmtcontent-type:text/htmlcontent-length:44411:09:02 GMT function Test () { Window.alert (" Hello world! " ); }</script>
Two times the HTTP request and the information returned by the server (that is, the local cache) is refreshed:
383 Bytes Sent to 127.0.0.1:8080
Get/ustc/js18-1.html http/1.1accept:text/html, Application/xhtml+xml, */*x-httpwatch-rid: 3307-10051accept-language:zh-cnuser-agent:mozilla/5.0 (Windows NT 6.1; trident/7.0; rv:11.0) like Geckoaccept-encoding:gzip, Deflatehost:localhost:8080if-modified-since:mon, 04:02:09 GMTIf-N one-match:w/"444-1431921729532" dnt:1connection:keep-alive
122 Bytes received by 127.0.0.1:2125
http/1.1 304 Not modifiedserver:apache-coyote/1.1etag:w/"444-1431921729532" Date:mon, the May 11:25:43 GMT
Note This paragraph:
http/1.1 304 Not Modified
When you click the button, the request is no longer sent to the server:
The JS code returns from the server to the client and executes the JS script on the local client .
Javascript History
Netscape , who developed LiveScriptin 1996 , later worked with Sun to LiveScript renamed to Javascript.
Javascript has nothing to do with the Java language, and it has to do with the java Company.
Microsoft developed the JScript language, with Javascript similarity of up to 99%.
Browser Development History:
1993 NCSA Development Mosaic
NETscape Open Source, create Mozilla;
Browser:
① Advertising
② All the information is passed through the browser.
About JS Basic Introduction