By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,043 Members | 1,215 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,043 IT Pros & Developers. It's quick & easy.

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

100+
P: 110
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?
Jan 9 '09 #1
Share this Question
Share on Google+
2 Replies


acoder
Expert Mod 15k+
P: 16,027
Use the onfocus event handler.
Jan 10 '09 #2

wgale025
P: 23
Expand|Select|Wrap|Line Numbers
  1. <HTML>
  2. <HEAD>
  3. <TITLE> New Document </TITLE>
  4. </HEAD>
  5. <BODY>
  6. <a href="http://www.google.cn" onfocus="document.body.focus();" onclick="return false;//stop transfer">google</a>
  7. </BODY>
  8. </HTML>
  9.  
you can try this!
Jan 10 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.