In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces whether filling in the form can be saved automatically on a regular basis like word. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
When using to fill in the report, some users need to fill in more content at one time, in case the browser stutter does not respond, and then lead to data loss, they have to re-fill in. It is estimated to be "accident scene" (ten thousand words are omitted here). At this time, I was wondering whether filling out the report could achieve the effect of automatic regular submission and saving in the editing process like word.
Fortunately, the answer is yes.
Let's talk specifically about how this effect is achieved. The indispensable thing to achieve this effect is the help of js, and then cooperate with the data submission method of drying the report.
The specific operations are as follows:
First of all, it is clear which jsp is used to parse the current filling form display.
Note: take showReport.jsp as an example.
Then, apply the method of js to perform an operation regularly (I don't know to ask Duniang directly), such as:
SetInterval (js method to be executed, interval of execution)
-time is in milliseconds
Finally, the operation of submitting data is performed regularly: _ inputSubmit (").
To take a full look, the js method is defined in the jsp shown in the report as follows:
In this way, we can easily achieve the effect of regular commit and save like word (in this example, the commit operation is performed every 3 seconds).
It's the same old routine, and at the end of the day, draw a crucial technical posture:
1. Timing method
The setInterval method controls what actions are performed at a regular time through js.
The method executor requires users to customize it according to their actual application. For example, if you write alert (prompt message) in the method, you will alert it every three seconds; if you write submit data in the method, you will submit the data once in three seconds.
InputApi.saveSuccess is what action is performed after the data is successfully submitted. The default is alert (saved successfully). You can also customize other actions, such as doing nothing or refreshing the page.
two。 Submission method
The _ inputSubmit () method dries up the built-in report submission method. Some personalized operations are often implemented in conjunction with the js method. For example, after submission, you jump to a specified page, and the flag field realizes the temporary storage and locking of the filled data.
Whether filling in the report form can be saved automatically like word is shared here. I hope the above content can be helpful to everyone and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.