Difference between revisions of "Anchor with no href"
Jump to navigation
Jump to search
(Created page with "Anchor with no href but with onclick and tabindex but no role. <html> <a onclick="alert('jon');" tabindex="0"> Our site </a> </html>") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<html> | <html> | ||
− | <a onclick=" | + | <head> |
+ | <script> | ||
+ | function check() { | ||
+ | if (event.keyCode == 32 || event.keyCode == 13) { | ||
+ | window.location = "http://www.google.com"; | ||
+ | event.preventDefault() | ||
+ | } | ||
+ | } | ||
+ | </script> | ||
+ | </head> | ||
+ | <body> | ||
+ | <a onclick="window.location = 'http://www.google.com';" tabindex="0" onKeyup="check();"> Our site </a> | ||
+ | <a onclick="window.location = 'http://www.google.com';" onKeyup="check();"> Our site </a> | ||
+ | |||
+ | </body> | ||
</html> | </html> |