2012-06-20 76 views
0

我想通过以下方式来使用iframe:龙卷风IFRAME SRC

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

在龙卷风服务器看起来就像这样:

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来显示信息。 HTML?

+0

请提高你的问题。什么是“正确”的标准? –

+0

对不起,我想知道我应该如何显示它在第一位。 – Abs

+0

放置iframe的页面在哪里投放? –

回答

0

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

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

有:

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