简体   繁体   English

我可以保存/导出html页面输入数据并在以后恢复/加载吗?

[英]Can I save/export html page input data and restore/load it later?

I have a HTML page with plenty of input fields(around 50). 我有一个包含大量输入字段的HTML页面(大约50个)。 I got some complaints that when someone is starting filling the forms and, if they get a call(for example), the session expires and all the data is getting lost, so they have to start filling over again all the fields. 我得到一些投诉,当有人开始填写表单时,如果他们接到电话(例如),会话到期并且所有数据都丢失了,所以他们必须重新开始填写所有字段。 You understand that I can't remove the session for security reasons. 您了解我出于安全原因无法删除会话。 I was thinking to place a save button and when it is clicked I have to save the page(something like a HTML screenshot?), so if the session expires, the customer will just load all the inputed data inside of the boxes, but I really have no idea how to. 我想放置一个save按钮,当它被点击时我必须保存页面(类似HTML截图?),所以如果会话到期,客户只会加载框内的所有输入数据,但我真的不知道怎么做。 Maybe the save button have to download a file? 也许保存按钮必须下载文件? I don't know 我不知道

Is there something that can export the data and import it later in the browser? 是否可以导出数据并稍后在浏览器中导入数据?

I'm not asking for code, I just need some clues, or ideas, because I'm out of luck right now. 我不是要求代码,我只是需要一些线索或想法,因为我现在运气不好。

The technologies I'm using are: java , javascript , jquery running on a jBoss 7 server 我正在使用的技术是:在jBoss 7服务器上运行的javajavascriptjquery

You may use html localStorage and store them locally, and when user wants to continue again you can restore from that storage. 您可以使用html localStorage并在本地存储它们,当用户想要再次继续时,您可以从该存储中恢复。 You should clear them after user completes the steps. 用户完成步骤后应清除它们。 http://www.w3schools.com/html/html5_webstorage.asp you can read this link. http://www.w3schools.com/html/html5_webstorage.asp你可以阅读这个链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将对象保存到文件中,以便以后可以加载? - How to save an object into a file, so that i can load it later? 如何将图像保存到用户的手机? 然后加载它? - How can I save an Image to the phone of the user ? and later load it? 如果我使用WebView.destroy(),则可以在以后恢复它吗? - Android if I use WebView.destroy() can I restore it later? 如何保存首选项页面的stringfieldeditor的输入值? - How can I save the input values of the stringfieldeditor of preference page? 如何保存和恢复用户看到的最后一个图像视图? - How can I save and restore the last Image View seen by the user? 如何将我的 html 解析数据保存为 CSV 文件? - How can I save my html parsed data as a CSV file? 如何保存输入以便以后使用(我一直在尝试使用共享首选项)? - How to save an input to use it later ( I've been trying using Shared preference)? 使用HTML字符串输入,我可以保存该字符串并将其作为参数(java)传递到PHP exec()命令中吗? - Using an HTML string input, can I save that string and pass it on as parameters(java) in an PHP exec() command? 用户如何在Android浏览器中单击元素来保存HTML页面的一部分 - How can I save part of an HTML page by a user clicking on an element in browser on Android 如何为匿名用户保存数据供以后使用 - How to save data for an anonymous user for a later use
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM