开发者

Getting input by name and not by index

开发者 https://www.devze.com 2023-03-06 14:13 出处:网络
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:

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');
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号