我试图通过URL 将参数传递给这个CGI表单(http://www.westegg.com/inflation/),所以我不必手动输入它们,这样我就可以通过其他方式生成URL为了更快的使用.
以下是该网站的CGI表单代码:
<form action="infl.cgi" method="post">
Enter the amount of money: <input name="money" type="text" size="9">
<p>
Enter the initial year (1800-2008):
<input name="first" type="text" size="4" maxlength="4">
<p>
Enter the final year (1800-2008):
<input name="final" type="text" size="4" maxlength="4" value="2007">
<p>
<center>
<input type="submit" value="Submit">
</center>
</form>
Run Code Online (Sandbox Code Playgroud)
我试过通过"?"传递参数 和"&"语法,但这些都不起作用:
http://www.westegg.com/inflation/infl.cgi?money=1&first=1800&last=1900
http://www.westegg.com/inflation/infl.cgi?money="1.00"&first="1800"&last="1900"
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助 :)