[手] (1) What is JavaScript

xiaoxiao2021-03-06  65

JavaScript is a powerful programming language on WWW for developing interactive web pages. It not only can be applied directly to HTML documents to obtain interactive effects or other dynamic effects, but also can run on the server side, replacing the traditional CGI program.

1. Client application

JavaScript The most typical application is to develop client web applications, which is to develop so-called client scripts. Unlike advanced languages, client scripts are usually interpreted. That is, it is not necessary to compile pre-processing before executing the JavaScript script. In the most typical client applications, the JavaScript script is embedded in the HTML file and downloads the browser with the HTML file. The browser reads the HTML file and explains the elements of the execution and display. The process of reading the HTML file and resolving the elements of the element is called syntax analysis or parsing. If you resolve to the JavaScript script, the browser performs its scripting statement.

2. Server application

JavaScript scripts can not only be run on the client, but also run on the server side, used to implement certain features of the server side (eg, replacing the conventional CGI program form processing function). On Microsoft's servers, a typical application is the implementation script as an ASP (Active Server Pages, Active Server Page). The server-side script works as follows: Browser Enter URL request; server call script, generate objects passing data from the browser, and provide these objects to the script (for database applications, specific database operations), The data is returned by the server by the server in the way the data is returned through the server.

Some people may have problems. Since FrontPage, Dreamweaver and other web design software can automatically generate AVAScript code to complete the production of dynamic web pages, is it necessary to learn JavaScript?

First, JavaScript is the most popular web scripting language that is the most widely compatible. In fact, VBScript is also a universal web scripting language, and is developed by the boss of the software industry - Microsoft, but because it can only be supported by the IE browser, it cannot be competed with JavaScript. As for other web scripting languages ​​other than VBScript, it has a weak impact. Imagine that even the Microsoft, the Microsoft, which has always been unable to develop its own JavaScript version - JScript, what is the doubt about JavaScript as a Web scripting language? Therefore, JavaScript is undoubtedly preferred if you need to learn a web scripting language.

Second, it is obviously a loud "Yes" for learning a web scripting language. Let's first look at the change of web page production tool software: the early most popular web page production tools are undoubtedly FrontPage, but in recent years, the most popular software has become Dreamweaver, and there is a big way to take FrontPage. In this regard, there are two main reasons: First, the panel interface provided by Dreamweaver is more suitable for web page design than FrontPage. Second, Dreamweaver provides more dynamic characteristics, especially Dreamweaver, can be with Fireworks. Software such as flash is closely integrated, thereby developing a very feudible and bright web page. In fact, the second cause represents a trend in today's web page development, that is, not only pays attention to content, but also pays attention to performance form. Therefore, development dynamic web pages have become a basic requirement for web pages. If we look at the HTML source code for the dynamic web page generated by Dreamweaver and other software, we will find that a large number of JavaScript code is filled with a large number of dynamic characteristics in Dreamweaver is achieved by JavaScript. Since the Web attractive is in its uniqueness, the automatic functionality of the web production tool is obviously very limited (although enough to cope with the basic needs), if you want to create a personalized dynamic function, you must of course use one Web scripting language. It can be seen that if you want to be a web page creation master, master a web scripting language is a basic requirement. In summary, learning JavaScript is imperative, it will lead us to enter the world of WEB development.

转载请注明原文地址:https://www.9cbs.com/read-89985.html

New Post(0)