how can I disable the focus() option from hyperlinks?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andersond
    New Member
    • Feb 2007
    • 110

    how can I disable the focus() option from hyperlinks?

    I have a problem with hyperlinks receiving focus() when I am trying to direct it somewhere else. I know I can take a regular object out of the tab sequence by making it's tabindex="-1". However, that doesn't seem to work with hyperlinks. Any suggestions?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Use the onfocus event handler.

    Comment

    • wgale025
      New Member
      • Feb 2007
      • 23

      #3
      Code:
      <HTML>
      <HEAD>
      <TITLE> New Document </TITLE>
      </HEAD>
      <BODY>
      <a href="http://www.google.cn" onfocus="document.body.focus();" onclick="return false;//stop transfer">google</a>
      </BODY>
      </HTML>
      you can try this!

      Comment

      Working...