blob: 8ebdddf978ec45a5a9e04d5477708b2dfd1e6dbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<html>
<head>
<title>Page with js navigation in the end of document to anchor within the page</title>
</head>
<style>
.fardown {
position: absolute;
top: 2500px;
}
</style>
<body>
<div><a id="anchorLink" href="#anchor">go to the anchor</a></div>
<div class="fardown" id="anchor">here is the anchor</div>
<script>
addEventListener('load', (event) => {
window.location.replace(document.getElementById('anchorLink').href)
})
</script>
</body>
</html>
|