我有一个和the next one正好相反的问题
我使用的是jQuery ChosenMultiSelect插件。使用IE 11
或Microsoft Edge
时,如果我从下拉列表中选择3个选项,浏览到另一个页面,然后按浏览器的后退按钮,这些值不会保留在文本区域中。
在Chrome中,如果我做同样的事情,这些值将被保留。
发布于 2018-09-25 22:12:04
我已经通过window.history.pushState (null, null, url);
在URL中设置参数来完成这项工作。
来自this answer的函数
function parameterizeArray(key, arr) {
if (!arr) {
return "";
}
arr = arr.map(encodeURIComponent);
return '?' + key + '=' + arr.join('&' + key + '=');
}
https://stackoverflow.com/questions/52498834
复制相似问题