【发布时间】:2018-05-21 05:05:24
【问题描述】:
我想在渲染页面时将 href 中的查询字符串值作为参数传递。我尝试过:
<a href="/room?nw=" + nw ><button type="button" class="btn btn-primary btn-xs">Add</button></a>
我使用了tornado框架,python脚本是:
class Room(tornado.web.RequestHandler):
def get(self):
nw=Test
self.render("Room.html",nw=nw)
但查询字符串不采用值“Test”它给出“/room?nw=”作为 URL.i.e.没有值 Test。任何帮助将不胜感激。
【问题讨论】: