JavaScript prepare guest Book program code 1th/3 page _javascript Tips

Source: Internet
Author: User
Tags prepare
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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.