ZVON > References > DOM2 Reference

focus (method )

Owning interface and usage:  
HTMLSelectElement.focus()

Member of these other interfaces:  
none

Description:  
Gives keyboard focus to this element.

Parameters:  
none

Returns:  
nothing

Exceptions:  
none


Example:
Source:
   <SELECT id="component-select">
      <OPTION value="Component_1_a" selected="selected">Component_1</OPTION>
      <OPTION value="Component_1_b">Component_2</OPTION>
      <OPTION value="Component_2_a">Component_3</OPTION>
   </SELECT>
JavaScript:
  function focusSelect() {
    var main = document.getElementById('component-select');
    main.focus();
  }
  function blurSelect() {
    var main = document.getElementById('component-select');
    main.blur();
  }
Try it:    
See it:



_____________________________________________
Reference Search | Sitemap | XML Glossary       ZVON | Systinet




Related sites:
  • dotNet Slackers - Your latest resource for ASP.NET
  • Dotnet Spider - Outsourcing and Offshore software development in India
  • XML - Xselerator, XSL Editor, BizTalk Utilities, XML Tutorials, Learn XML
  • Planet Source Code - The largest public source code database on the Internet
UNLIMITED Web Hosting by HostDepartment Alojamiento Web UK Domain Names glossary for conference call answering service
MSN VoIP Internettelefonie Hosted Exchange, SDSL VoIP Internettelefonie AT VoIP Internettelefonie DE