1
我试图让一个属性中的值在javascript中回传后保留。但是,当我更改页面时,我希望清理这个变量。在回发中保存变量,但在离开页面上清除/不保留
在这个时刻我已经尝试了一些方法:
- 隐藏字段
- localStorage的
- 全局变量
- 的document.cookie
我的JavaScript文件只包含一个功能,键入以下内容:
function PropertiesSearchListingViewModelCreator(arg1, arg2, arg3)
{
//Where do I want to preserve the variable
}
有人可以帮助我吗? 感谢