Page 1/3 of JavaScript message book program code

Source: Internet
Author: User

How to compile the message book program? The message book program is not difficult. There are many options to implement it, such as CGI programs. This article describes how to use JavaScript to compile the message book program. The following is a complete example.

---- We provide a form containing the name, the email address of the guest, the browser version used, the country name, comments and suggestions, and the site you like. After entering these fields, press the Submit button and the information will be sent to you by email. The program provides several functions, most of which are used to check the validity of fields. The following is a simple description of the function.
---- The Reset () function resets the content of each field after pressing the Reset button.
---- Function submitForms (): press the submit button to check the validity of the field and then send an email.
---- The isName () function checks the validity of the Name field.
---- Function isEmail () checks the validity of the email address field.
---- The isBrowser () function compares browser fields with the browser version automatically detected.
---- The isCountry () function checks the validity of country fields.
---- The isComment () function checks the validity of opinion fields and does not allow null values.
---- The isFavorite () function checks validity of the site fields that you like. null values are not allowed.
---- The Program also provides some tips, such as how to determine the browser version and string operations.
---- The result is provided to you via email, which contains fields entered by the guests. The program is long, but it is not difficult to understand. The following is the source code:

Related Article

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: 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.