The document represented by the HTML code is a static document that has little interactivity and makes it difficult to make a page dynamic. Adding scripting languages allows data to be processed and validated before it is sent to the server, dynamically creating new Web content, and more importantly, introducing a scripting language that enables us to have an event-driven software development environment. ( 1 JavaScript Introduction JavaScript's original name LiveScript, is Netscape company in the introduction of Sun's Java program design concept, redesigned and renamed. JavaScript is a scripting language that can embed HTML documents, object-based, and have some object-oriented features. Description: The browser-side scripting language, in addition to JavaScript, is VBScript and JScript, and the latter two are designed by Microsoft, and can be found on the Microsoft Company Web site for information. This course covers only JavaScript. ( 2JavaScript is characteristic of JavaScript as an object-based-Based) and event driven, which are interpreted by the browser, perform a client-side scripting language that has security performance. It is used to link multiple objects in a Web page with HTML, Java applet (Java applets), interact with Web clients, and so on, to develop client applications. It is implemented by embedding it in the HTML language. Its appearance makes up for the HTML language flaw, it is the Java and the HTML compromise choice, has the following several basic characteristics:?is a scripting languageIn the way of the small program to implement programming, in an embedded way, and the HTML identity together to facilitate user's use of the operation. Object-based language. The object here refers to the client, browser, Web document. In other words, JavaScript is a client-side scripting language that controls the client, the browser, the Web document, the various HTML elements in the document that are tagged as objects, in the same way as the C, Java syntax, to control these objects.SimpleFirst, it's a simple and compact design based on Java's basic statements and control flow, making it a great transition for learning Java. Second, its variable type is weakly typed and does not use strict data types.SafetyIt does not allow access to local hard disks on the server, so data cannot be stored on the server, modifications and deletions to network documents are not allowed, and information browsing or dynamic interaction can only be done through the browser. So as to effectively prevent the loss of data. Dynamic It can respond directly to the user's input without having to go through a Web service program. It responds to the user in an event-driven manner. Event can be divided into two categories, one is the user to the browser to do some kind of operation, such as mouse down, Mobile window, select menu, etc., can be regarded as user events, and the second is the system events, such as the time of the change and so on. When an event occurs, a corresponding message (user message or system message) is sent to the browser, and depending on the message, the browser may respond appropriately, which is called event-driven or message-driven.Cross-platform JavaScript code is interpreted by the browser, regardless of the operating environment, as long as the browser can run the computer, and support JavaScript browser can be executed correctly, thus achieving the "write once, go around the world" dream. In fact, the best thing about JavaScript is that you can do a lot of things with very small programs. No need to have a high-performance computer, the software only need a word processing software and a browser, without the Web server channel, through their own computer can do all things. JavaScript is similar to Java, but not the same. Java is a much more complex programming language than JavaScript, while JavaScript is a fairly easy-to-understand language. Many Java features are not supported in Java Script. ( 3) How JavaScript works 1JavaScript works JavaScript programming can be done such as construction animation, dynamic menu and so on to make the page more lively and lively task (see Hongen Online: http://www.hongen.com/pc/homepage/javascript/index1.htm), can also operate on the client file system, registry, etc., such as folder, file creation, copy, delete, modify the registry, lock the Registry, Lock the browser and so on, there are many viruses that run as the Web page opens, which is the JavaScript program that is included in the Web page. This shows that JavaScript is the wizard that controls the client. In the B/S program, in order to balance the load, reduce the computational burden of the server, usually do not need the server program to do the work, can be as far as possible to the client program (such as JavaScript program) to do. We use HTML tags to construct the user interface, user input data through the interface, request data from the browser and other operations. When the user enters the data, or the input is complete, the data is submitted to the server, the test of the data and other tasks can be completely handed to the JavaScript program to complete. This course introduces JavaScript programming techniques for such tasks.using JavaScript scripts to verify how the form data JavaScript Works is based on objects and some object-oriented features :? JavaScript controls the client and operates on the client by controlling the various objects on the client. Respond appropriately to user or system events.
How JavaScript works