Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
HTML::DOM::NodeList::RUser(Contributed Perl DocumHTML::DOM::NodeList::Radio(3)

NAME
       HTML::DOM::NodeList::Radio - A Perl class for representing lists	of
       radio buttons in	an HTML	DOM tree

VERSION
       Version 0.054

SYNOPSIS
	 use HTML::DOM;
	 $doc =	HTML::DOM->new;
	 $doc->write('
	     <form>
		 <input	name=r type=radio value=one>
		 <input	name=r type=radio value=two>
	     </form>
	 ');
	 $doc->close;

	 $radio_list = $doc->forms->[0]->find_input('r');
	 # returns an HTML::DOM::NodeList::Radio object

	 $radio_list->[0]; # get first button
	 $radio_list->item(0); # same

	 # also:
	 $radio_list->value('two'); # select a radio button
	 $radio-list->name; # returns 'r'

DESCRIPTION
       An object of this class represents a list of radio buttons in an
       HTML::DOM tree. This class inherits from	HTML::DOM::NodeList:: and is
       provided	solely for compatibility with WWW::Mechanize.

METHODS
       In addition to those inherited from HTML::DOM::NodeList,	this class
       implements the following	methods:

       type
	   Returns the string 'radio'.

       name
	   Returns the name of the set of radio	buttons. If you	pass an
	   argument, it	will become the	new name of the	set (all the buttons
	   will	be renamed), and the old name will be returned.

       value
	   Returns the value attribute of the currently	selected radio button.
	   If you pass a value as an argument, the radio button	with that
	   value will be selected, and the value of the	previously selected
	   one will be returned.

       possible_values
	   Returns a list of the value attributes of all the radio buttons.

       form_name_value
	   Returns a list of two items:	(0) the	name of	the set	of buttons and
	   (1) the value of the	currently selected button.

SEE ALSO
       HTML::DOM

       HTML::DOM::NodeList

       HTML::DOM::Collection::Elements

       HTML::DOM::Element::Form

       The source of HTML/DOM/Element/Form.pm, where this is implemented.

perl v5.32.0			  2014-12-23	 HTML::DOM::NodeList::Radio(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | METHODS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=HTML::DOM::NodeList::Radio&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help