使用Python Tornado从select标记获取信息
我试图将用户选择的选项从下拉菜单传递到Python Tornado 我有以下HTML代码:使用Python Tornado从select标记获取信息,python,html,tornado,Python,Html,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 ti
<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和start,但是,每当我尝试选择它时,选项属性都会出错 在method=get的表单中,所有参数都在查询中发送。使用get\u query\u argumentsearcher而不是get\u body\u argumentsearcher。尝试添加此行
action = self.get_argument("searcher")
action = self.get_argument("searcher")