Browser back button does not work for Anchor links

后端 未结 4 2523
广开言路
广开言路 2021-02-20 08:36

In the footer of my page there a few links that point to different sections on the same page using anchor tags (# appended to the URL of the page).

This works fine, just

4条回答
  •  再見小時候
    2021-02-20 09:13

    if (document.referrer == "") {
    window.open("index.php");
    } else {
        window.history.go(-1);
        return false;
    }
    

提交回复
热议问题