I am new to js and html. I have a js code to redirect to a webpage in the same site, from https://example.com/html1.html to https://example.com/html2.html. I also want it so the back button can be enabled, but from what I have found from searching nothing provides an answer for what I am looking for.
Here is code:
location.href = "https://example.com/html2.html"; For some reason the back button to go to the previous page (https://example.com/html1.html) does not work.
https://stackoverflow.com/questions/66926874/how-to-enable-history-back-button-when-using-location-href-site April 03, 2021 at 09:06AM
没有评论:
发表评论