After a hyperlink is clicked, it is shown on the page that it has already been clicked, and then after the page is refreshed, the style is removed.

related questions

One of the items in the

list is clicked to jump, and after clicking, the list shows that this item has been previewed, but when the page is actively refreshed, the style is removed and returned to the state before the preview.
after debugging the expiration of the web page or switching the login personnel style, it can be removed, so the query: the life cycle of visited really needs the expiration of the page to remove this style. at present, in addition to this method, there are other ways to refresh the page and remove the style.

related codes

    table a {
        color: -sharp105acc;
    }
    table a:visited {
        color: -sharp0a2456;
    }
Mar.09,2021

js jq can do

<body >
 <script src="//cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<a href="-sharp-sharp">5555</a>
<script>
    $('a').css('color','red');
</script>
</body>

1. Style clears the default access style
2. Then dynamically style each visited link in the page through JS
so that when the page is refreshed, it automatically returns to its original state


Why bother to write in js? You might as well clear the default style directly in css, or set it to color, and set color so that there will be no color changes.

Menu