简体   繁体   English

当页面第一次在编辑链接上加载时,如何保存值?

[英]How can I preserve the values when the page is loaded first time on the edit link click

I have one page on which I am showing grid model with edit links in MVC. 我有一页显示MVC中带有编辑链接的网格模型。 Now on click of that edit link we are getting redirected to other page. 现在,单击该编辑链接,我们将重定向到其他页面。 On that page I have 4 buttons, on the click on that buttons grid model is shown. 在该页面上,我有4个按钮,单击该按钮将显示网格模型。

how I can preserve the values when the page is first time loaded when we click on the edit link in jquery? 当我们单击jquery中的edit链接时,如何在第一次加载页面时保留值?

You can use localstorage to save your formData and then when your next page loads you can use the data from localstorage. 您可以使用localstorage保存formData,然后在加载下一页时可以使用localstorage中的数据。 https://developer.mozilla.org/en/docs/Web/API/Window/localStorage https://developer.mozilla.org/en/docs/Web/API/Window/localStorage

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

相关问题 打开对话框以响应链接触发器时,如何保留页面滚动位置? - How can I preserve the page scroll position when opening a dialog in response to a link trigger? 当我单击一个链接时,它必须显示“正在加载动画”,直到加载另一个页面为止,该怎么做? - when I click on a link it has to show “some loading animation” till another page is loaded,how to do that? AngularJS-第一次加载页面时,如何为ng-disabled指令设置真值? - AngularJS - How can set the true value for ng-disabled directive, when the page is loaded first time? 如何单击链接但不刷新页面? - How can I click a link but not refresh the page? 如何单击链接但不重新加载页面? - How can I click a link but not reload the page? 加载新页面时如何在WebView中保留已加载的javascript内容? - How to preserve loaded javascript content in a WebView when loading a new page? 首次加载页面时未加载任何js文件 - None of js files gets loaded when a page is loaded for the first time 加载值时如何编辑表单? - How to edit a form when it is loaded with values? 如何在用户首次登录时以及第一次加载特定页面时检测到? - How do I detect the first time the user logs in and the first time a specific page is loaded? 当我第二次点击链接时如何显示面板 - How can i show panel when i click second time on link
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM