After clicking the link with a common href (local page or website) and href successfully loaded, both FF2 and IE7 link with: visited style are displayed.
For links with href = "javascript: anyfunc ()", IE7 works as described above while FF2 does not display: visited style. Without any changes to DOCTYPE.
Q: Is the behavior with JS links and: visited considered correct?
Q: Does FF2 leave the binding state unchanged after clicking on the JS link?
Q: Without having to bind the onClick handler or change classes / style with JS, is there a compressed way to tell FF2 to use: visted does not depend on whether href is another page or JS link?
Example:
<html> <head> <style> div.links { font-size: 18px; } div.links a { color: black; text-decoration: none; } div.links a:visited { background-color: purple; color: yellow; } div.links a:hover { background-color: yellow; color: black; } </style> <script> function tfunc(info) { alert("tfunc: info = " + info) } </script> </head> <body> <div class="links"> <a href="javascript:tfunc(10)">JS Link 1</a><br> <a href="javascript:tfunc(20)">JS Link 2</a><br> <a href="http://www.google.com/">Common href, google</a> </div> </body> </html>
Gary-7
source share