标签:val class param sep upd color span string ace
function updateQueryStringParameter(uri, key, value) { var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); var separator = uri.indexOf(‘?‘) !== -1 ? "&" : "?"; if (uri.match(re)) { return uri.replace(re, ‘$1‘ + key + "=" + value + ‘$2‘); } else { return uri + separator + key + "=" + value; } }
标签:val class param sep upd color span string ace
原文地址:https://www.cnblogs.com/zzghk/p/10529298.html