Answer the question
In order to leave comments, you need to log in
How to make the "Go back" button appear/active when a history appears on the page?
There is a button in the menu Back
<a href="#" onclick="history.back();return false;">Вернуться назад</a>
Answer the question
In order to leave comments, you need to log in
<a href="#" class="d-none" id="history-back" onclick="history.back();return false;">Back</a>
window.addEventListener("load", function() {
if (window.history.length > 1) {
document.getElementById("history-back").classList.remove("d-none");
}
});
.d-none {
display: none;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question