1
我試圖讓一個屬性中的值在javascript中回傳後保留。但是,當我更改頁面時,我希望清理這個變量。在回發中保存變量,但在離開頁面上清除/不保留
在這個時刻我已經嘗試了一些方法:
- 隱藏字段
- localStorage的
- 全局變量
- 的document.cookie
我的JavaScript文件只包含一個功能,鍵入以下內容:
function PropertiesSearchListingViewModelCreator(arg1, arg2, arg3)
{
//Where do I want to preserve the variable
}
有人可以幫助我嗎? 感謝