This is my footer HTML code:
<footer> <div> <a href='a.aspx'>test 1</a> <a href='b.aspx'>test 2</a> </div> <a href='c.aspx'>test 3</a> <footer>
Is there a way to always run a JavaScript function before a link redirect in ? And is it possible to find within the function where it will redirect to?
Sure.
.querySelectorAll
is the perfect selector for this.