'options' Syntax Parameters and Note : options « Javascript Collections « JavaScript Reference

'options' Syntax Parameters and Note

Note:

Returns an array of all the <option> elements in a <select>.
    
Syntax:
    
document.getElementById("selectID").options // returns all options
document.getElementById("selectID").options(param1, param2) // returns an individual option
document.all.selectID.options // IE only
document.all.selectID.options(param1, param2) // IE only

Parameters:
    param1   Required; zero-based index or
                       desired member's id or name attribute.
                       
    param2   Optional; the zero-based index for the result returned
                       if param1 matches more than one element.
      
      








Related examples in the same category

1.'options' Example
2.'options' JavaScript properties and JavaScript methods
3.'options' is applied to