擅长:python、mysql、java
<p>正如@dim所提到的,将select放在表单中,可以使用<code>request.form['Item_1']</code>获得所选的值。但是,查询的项目是一个select,所以我更喜欢使用get而不是POST。在wiki中,<a href="http://en.wikipedia.org/wiki/POST_%28HTTP%29" rel="nofollow">http://en.wikipedia.org/wiki/POST_(HTTP)</a>,POST用于</p>
<pre>
The POST request method is designed to request that a web server accept the data enclosed in the request message's body for storage.[1] It is often used when uploading a file or submitting a completed web form.
</pre>
<p>所以我更喜欢GET,它可以用来查询数据库。使用GET时,项1可以作为请求参数传递,并使用<a href="http://flask.pocoo.org/docs/api/#flask.Request.args" rel="nofollow">flask.request.args</a>获取</p>