faqts : Computers : Programming : Languages : JavaScript : Links

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

39 of 47 people (83%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

Do links have a focus method?
Can I call focus() on a link?

Apr 2nd, 2000 11:24
Martin Honnen,


With IE4+ and NN6 links have a focus method you can call, in NN4 (and 
older) not. Thus script
  var link = document.links[linkIndex];
  if (link.focus)
    link.focus()
to call the focus method where it is available.