开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜