Getting input by name and not by index
HTML snippet:
<input type='hidden' name='id' value='default' />
I'm using WWW::Mechanize to fill in a form, an input of which is above. I'm doing this:
$inputs[0]->value("nondefault");
since it's the first input in the form. But is there a way to refe开发者_如何转开发r to it as id
?
According to the documentation,
$form->param('id', 'nondefault');
精彩评论