Clear Form on Back Button?

后端 未结 4 960
太阳男子
太阳男子 2020-12-16 04:46

I have a page with several check-boxes in a form, which when selected, filter corresponding info out of a table with jquery. My problem is the following scenario:

4条回答
  •  臣服心动
    2020-12-16 05:19

    So your problem is not with the browser caching the user input but with the rows not being hidden. You can easily solve this problem by adding a jQuery script that will check if a checkbox is checked (after loading the page). If it's checked, you hide the row :)

    pseudocode:

    1. wait for the page to load
    2. for each checkbox check if checked
    3. if it's checked, hide the corresponding row in the same way you did when the user checked it.
    

提交回复
热议问题