how to remember input data in the forms even after refresh page?

后端 未结 10 1485
日久生厌
日久生厌 2020-11-27 17:11

what to do in order to make the form remember the previous input or the current input of the user even after he/she refreshed the page ?

should I do ,



        
10条回答
  •  一向
    一向 (楼主)
    2020-11-27 17:37

    That quite depends on where the data in the fields is coming from. If your scenario is that you are presenting a blank form, the user enters some data and then without submitting it, refreshes the page, there is nothing you can do. That's up for the browser to handle.

    You might be able to do some very weird JavaScript hacking there, but I would not suggest that.

    On the other hand, if your data is coming from a previous page or something like that, that's a different story. But then you need to tell us where the data is coming from, so I can give you a reasonable answer.

提交回复
热议问题