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: