Draft of AJAX exploitation is automatically retained

Source: Internet
Author: User
People who trust Gmail know that Gmail has a draft function that is actively retained. every time, Gmail will take the initiative to retained the draft of the mail, so that it can quickly resume work in some emergencies, so that no email is written for half a day in the twinkling of an eye.

People who trust Gmail know that Gmail has a draft function that is actively retained. every time, Gmail will take the initiative to retained the draft of the mail, so that it can quickly resume work in some emergencies, otherwise, emails written for half a day will disappear in the twinkling of an eye. After learning AJAX, I also added this function to my blog. Of course, this utilization is not limited to the blog. it should be said that it is more common.

Instance demo

The code and comments are still used to illustrate how to write the code.

The first step is to fill in the form page, use a DIV with the ID AutoSaveMsg to display the returned information, and use a CheckBox with the ID Draft_AutoSave to determine whether to actively retain the information, name the Textarea ID as message. At the same time, in order to meet the needs of multiple users for simultaneous application, the user name is added, and each user's draft is left and retained. In order to clarify the convenience, I dropped some polishing things, which looks more clear:

Reference content is as follows:

Draft of AJAX exploitation is automatically retained

User name:

Active reservation?

Content:


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.