0

我正在尝试通过以下方式使用 iframe:

<iframe src="????" width="350" height="500"></iframe>

Tornado 服务器如下所示:

class FrameHandler(RequestHandler):
    def get(self):
        user = self.get_argument("username")
        self.set_cookie("user", user)
        out = tableizer(user)
        self.render('messages.html',table=out)

application = tornado.web.Application(
    [
        (r"/frame", FrameHandler),
    ], 
    debug=True,
    template_path=os.path.join(os.path.dirname(__file__), ""),
    static_path=os.path.join(os.path.dirname(__file__), "static"),
)

如何让我的 iframe 显示messages.html?

4

1 回答 1

0

处理程序看起来不错。你只需要代????

<iframe src="????" width="350" height="500"></iframe>

和:

<iframe src="/frame?user=whoever" width="350" height="500"></iframe>
于 2012-06-25T16:15:26.277 回答