HTML DOM Option Object>>

Option Object

The Option object represents a selectable option in a drop-down list in an HTML form. For each instance of an <option> tag in an HTML form, an Option object is created.

You can access an Option object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().

IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).

Option Object Properties

Property Description IE F N W3C
defaultSelected Sets or returns the value of the selected attribute of the option 3 1 6 Yes
disabled Sets or returns a Boolean value that specifies whether the option should be disabled 5 1 6 Yes
form Returns a reference to the form that contains the option 3 1 6 Yes
id Sets or returns the id of the option (In IE 4 this property is read-only) 4 1   No
index Sets or returns the position of the option in the select box 3     Yes
label Sets or returns a label for the option object 6     Yes
selected Sets or returns the current state of the option 3 1 6 Yes
text Sets or returns the text value for the <option> tag 3 1 6 Yes
value Sets or returns the value to be returned to the server when an option is selected and the form is submitted 3 1 6 Yes

Option Object Methods

Method Description IE F N W3C
click() Simulates a mouse-click on the option 4     No

 

<< Back








   



MSN Nick Name



More Resources...





Most Viewed Services:
  1. HTML Tutorial
  2. XHTML Tutorial
  3. CSS Tutorial
  4. Javascript Tutorial
  5. DHTML Tutorial
  6. VB Script
  7. TCP/IP Tutorial
  8. ADO Tutorial
  9. MYSQL Tutorial
  10. ASP Tutorial
  11. AJAX Tutorial
  12. CFML Tutorial
  13. PHP Tutorial
  14. WML Tutorial
  15. FLASH Tutorial
  16. XML Tutorial
  17. RSS Tutorial
  18. SQL Tutorial
  19. HTML Articles
  1. Javascript Articles
  2. PHP Articles
  3. SEO Articles
  4. Web Design Articles
  5. SEO Tips
  6. Web Design Tips
  7. Articles
  8. CSS
  9. CSS Tips
  10. HTML Tips
  11. JAVASCRIPT Tips
  12. MYSQL Tips
  13. PHP Tips
  14. Money
  15. Tutorials
  16. Web Hosting



  • Home
  • Web Directory
  • Top Directoriers
  • Webmaster Directories
  • Contact
  • © Copyright 2006 All Rights Reserved By CodeDcode.Com