Javascript|web with the popularization of internet/intranet application, more and more users use the Client/server structure in the design and establish their own internet/intranet application. The client program is responsible for sending requests to the Web server and is responsible for accepting and interpreting the display of hypertext from the Web server. If you want to generate dynamic, interactive Web pages, you must pass the Public Gateway Interface (CGI), CGI programs can be written using perl,c++,javascript, and so on, and the current popular method is to use Java or JavaScript.
A brief introduction of JavaScript
JavaScript is a scripting language, and the advantage is that it applies both to client applications and to server-side application development. For example, at the client it can be used to write a Web browser program, while in the server it can be used to write information for processing Web browser submissions and to update the Web server program displayed by the browser accordingly. Although JavaScript can meet some of the server-side programming requirements, some server-side programs are needed to support more advanced Web applications. For example, access to a database or special processing. To this end, Netscape specializes in providing an integrated environment livewire for developing JavaScript server programs.
Ii. Introduction of Livewire
Livewire is a Web application development environment that you can use to install Netscape Fast track under a Windows NT4.0 system. Livewire can be used to develop browsers and server-side Web applications. So that the server side can replace the original CGI program needed. Livewire and Netscape servers can be downloaded from Netscape's Web site http://home.Netscape.com (30-day free trial).
Third, server-side JavaScript programming
The server-side JavaScript program is developed with livewire, and the specific programming steps are as follows:
1. Create source files in HTML embedded with client-side JavaScript and server-side JavaScript.
2, with the livewire compiler to compile the source file into a. web file.
Server-side JavaScript provides 4 objects, Request,client,project and server, to differentiate it from client-side JavaScript.
Below, we can develop some programs, first of all, in a simple example to introduce the development process:
Students. HTM provides student registration form for students to fill out.
Process.htm to deal with the number of students entered in the student. HTM registration Form
To combine client side with server-side JavaScript
To display the Student registration form and submit it to display.htm.
Display.htm shows the data collected by students. htm and process.htm, and
Stored in the Client property.
Record.htm the Student Registration form into the file student.txt.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.