for do that without a server is not so easy. But you can try a possible solution.
First you have to make some changes to your JS code:
let tabInfo;
for (var i=0; i<document.querySelectorAll(".tab").length; i++) {
document.querySelectorAll(".tab")[i].onclick = function () {
tabInfo = this.innerHTML;
document.location.href = "headingpage.html";
};
};
And on your headingpage.html:
<h1 class="tabInfo"><h1>
Then in the same or on a different JS file:
document.querySelector(".tabInfo").innerHTML = tabInfo;
Im not sure if it will work. In that case tell me and i will try more hard.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…