window.onpopstate = function(event) {
alert("location: " + document.location + ", state: " + JSON.stringify(event.state));
};
history.pushState({page: 1}, "title 1", "?page=1");
history.pushState({page: 2}, "title 2", "?page=2");
history.replaceState({page: 3}, "title 3", "?page=3");
history.back(); // alerts "location: http://example.com/example.html?page=1, state: {"page":1}"
history.back(); // alerts "location: http://example.com/example.html, state: null
history.go(2); // alerts "location: http://example.com/example.html?page=3, state: {"page":3}
Cost.NameProperty = 0;
function Cost() {
Cost.NameProperty++; // что-то подобное
}
function cost1() {
let allAmount = 0;
return function(tax) {
let amount = tax * 0.2;
allAmount += amount;
console.log(`сумма налогов: ${allAmount} рублей`);
return amount;
}
}
cost = cost1();
cost(50);
cost(100);
cost(150);
cost(200);
var is_html = document.getElementsByClassName("is_html")[0];
var is_html = document.getElementsByClassName("is_html")[1]; Вернёт ваш второй checkbox