|
NAMEHTML::DOM::Element::Select - A Perl class for representing 'select' elements in an HTML DOM tree VERSIONVersion 0.054 SYNOPSIS use HTML::DOM;
$doc = HTML::DOM->new;
$elem = $doc->createElement('select');
$elem->focus();
$elem->blur();
# $elem->add(...) # not yet
# $elem->remove(...) # implemented
$elem->options; # a list of 'option' elements
$elem->name('foo') # set attribute
$elem->type; # get attribute
$elem->tagName;
# etc.
$elem->[0]; # first option
$elem->[1] = $doc->createElement('option');
$elem->[0] = undef; # deletes it
delete $elem->[0]; # same
DESCRIPTIONThis class implements 'select' elements in an HTML::DOM tree. It implements the HTMLSelectElement DOM interface and inherits from HTML::DOM::Element (q.v.). ARRAY INTERFACEYou can use a 'select' element as an array reference, to access the individual elements of its options array. @$elem actually does exactly the same thing as "@{$elem->options}". See HTML::DOM::Collection::Options for more info on using the array. METHODSIn addition to those inherited from HTML::DOM::Element and its superclasses, this class implements the following DOM methods:
In addition, the following methods are provided for compatibility with WWW::Mechanize:
SEE ALSOHTML::DOM HTML::DOM::Collection::Options HTML::DOM::Element HTML::DOM::Element::Form
|