[英]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
服务器上运行的java
, javascript
, jquery
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.