There are 2 elements, you need to track their status, write to the url, and then, by copying the link and clicking on it, a page should appear with the selected parameters from the url. I added a change to the elements of the function for which the URL is changed, everything is OK with this, everything changes and works, but I don’t understand how I organize the assignment of parameters from the URL for these elements, please tell me.

function change_div_size(){ history.replaceState({page:1}, "size", '?valsize='+size_va+'&selskin='+sel_skin); } sizeSelect.addEventListener("change", change_div_size); 

    1 answer 1

    The parameters you use, which are after the? Sign, are available in window.location.search. You can take them from there as a string, parse that string and assign.