0
我想將用戶選擇的選項從下拉菜單傳遞給Python Tornado。使用Python Tornado從選擇標記獲取信息
我有以下的HTML代碼:
<form method="get" action="search">
<div class="input-group">
<input type="text" name="q" style="width:90%" placeholder="Search articles by title, author, keyword..." class="form-control">
<select name="searcher" id="searcher" class="selectpicker form-control" style="width: 10%;">
<option id ="default">Title, author, abstract</option>
<option id ="experiments">Experiments</option>
<option id ="pmid">PubMed ID</option>
<option id ="reference">Reference</option>
</select>
<span class="input-group-btn">
<input type="submit" class="btn btn-default" value="Search" />
</span>
</div>
</form>
,並在我的龍捲風獲取方法如下:
`
q = self.get_query_argument("q", "")
start = self.get_query_argument("start", 0)
option = self.get_body_argument("searcher")
`
我能夠選擇兩個然而,當我嘗試選擇它時,啓動選項屬性錯誤。