How to compile the guest book program? Guest Book program is not difficult, there are many options can be implemented, such as CGI programs and so on. This article describes how to use JavaScript to prepare a guest book program, the following is a complete example.
----We provide a form with a name, a guest's e-mail address, a browser version used, a country name, comments and suggestions, and a favorite site, and so on. Once the guest has completed these fields, press the Submit button and the information will be sent to you via email. Several functions are provided in the program, most of which are used to check the legality of the field. Let's make a simple description of the function below.
----function Reset () resets the contents of each field after pressing the reset button.
----function submitforms () sends an e-mail message after checking the legality of the field after pressing the Submit button.
----function isname () to check the validity of the name section.
----function Isemail () checks the e-mail address field for legality.
The----function IsBrowser () compares the browser field with the automatically detected browser version.
----function Iscountry () checks the legality of the Country field.
----function iscomment () Checks the opinion field for legality and does not allow null values.
----function Isfavorite () checks for the legality of the favorite site field and does not allow null values.
----program also provides some tips, such as how to determine the browser version, the operation of strings, and so on.
The----result is provided to you in the form of an email with various fields entered by the guest. The program is relatively long, but not ugly, the following is the source code:
Current 1/3 page
123 Next read the full text