我使用WWW :: Mechanize :: Firefox并且上传表单有问题。谁能告诉我如何使用该模块将文件提交到这样的表单?
<form action="http://www.cs.tut.fi/cgi-bin/run/~jkorpela/echo.cgi"
enctype="multipart/form-data" method="post">
<p>
Type some text (if you like):<br>
<input type="text" name="textline" size="30">
</p>
<p>
Please specify a file, or a set of files:<br>
<input type="file" name="datafile" size="40">
</p>
<div>
<input type="submit" value="Send">
</div>
</form>
编辑::更具体地说,我必须点击这样的按钮
<B><FONT SIZE=2>Then click...</FONT></B><A HREF="Javascript:CheckPortfolioUpload('Portfolio - Select Portfolio - Upload ? Go ~ Results')"><IMG NAME=GoBtn SRC=/images/button/GreenGo.gif BORDER=0 TITLE='Upload' CLASS=Clickable></IMG></A>
</TABLE>
我该怎么做?
答案 0 :(得分:0)
$ mech-&gt; follow_link(url_regex =&gt; qr / CheckPortfolioUpload /);