在表单之间存储菜单数组数据 [英] store menu array data between forms
问题描述
我的菜单选项提供表单上的隐藏/显示复选框区域。在IE回发期间或返回期间数组丢失,复选框从视图中消失。现在我需要一种方法来保持页面之间的数组,以便表单上添加的复选框不会消失。
感谢您的建议。
My menu options provides hide/show checkbox areas on a form. During an IE postback or "back" the array is lost and the checkboxes disappear from view. Now I need a way to keep the array between pages so the added checkboxes on the form do not disappear.
Thanks for your suggestions.
推荐答案
使用cookie来存储复选框的当前状态。
Use cookies to store the current state of the checkboxes.
使用cookie来存储复选框的当前状态。
Use cookies to store the current state of the checkboxes.
感谢您的回复。
我一直在考虑添加一个cookie来存储菜单状态,但它'目前还不清楚如何正确地做到这一点。如果用户在单个会话期间选择并取消选择多个菜单选项,那么将该信息存储在cookie中是否真的有意义?如果是这样我会在cookie上设置一个时间吗?
感谢您的反馈!
Thanks for the reply acoder.
I have been looking into adding a cookie to store the menu status but it''s still unclear how to do this properly. If the user selects and deselects multiple menu options during a single session does storing that information in a cookie really make sense? If so would I set a time out on the cookie?
appreciate your feedback!
感谢你的回复。
我一直在考虑添加一个cookie来存储菜单状态,但目前还不清楚如何正确地做到这一点。如果用户在单个会话期间选择并取消选择多个菜单选项,那么将该信息存储在cookie中是否真的有意义?如果是这样我会在cookie上设置一个时间吗?
感谢您的反馈!
Thanks for the reply acoder.
I have been looking into adding a cookie to store the menu status but it''s still unclear how to do this properly. If the user selects and deselects multiple menu options during a single session does storing that information in a cookie really make sense? If so would I set a time out on the cookie?
appreciate your feedback!
您可以在使用onbeforeunload离开页面之前执行此操作。
You could do this just before leaving the page using onbeforeunload.
这篇关于在表单之间存储菜单数组数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!