Java Learning Pages

Lesson4-User Inputs and Functions-Eco the input in a another page



The concept of functions in JavaScript is similar to that of C. The function has a name, takes in the arguments, and executes the statements when called upon. The function is first defined, then used. Also, note that the functions are defined in the header sections of the html page.

Usually, the user information is gathered using HTML Forums and process using CGI scripts. JavaScript can assist in gathering and processing user inputs. After, the user has input the information or selection, some sort of action need to be performed. On of the way is to call a function described with in the JavaScript to perform the necessary action.

In this example, the user enters some information in the text area. That information is echoed in another page. Note that the information is not saved. Also, the other page does not contain a link back to the original page.