开发者

Using Page anchors on django

I would like to have AppEngine render an html page that auto scrolls to an html anchor point. I'm not sure how and where to pu开发者_运维百科t that type of instruction.

    template_values = { 
    'foo' : 'foo',
    'bar': 'bar',
    'anchor' : '#MyPageAnchor'  # ?? Something like this...
    }
    path = os.path.join(os.path.dirname(__file__), fileName) 
    self.response.out.write(template.render(path, template_values))

Is this possible? How do I accomplish this?


There's nothing App Engine specific here. You simply have to redirect the user to a URL that includes the anchor (eg, http://example.com/foo#anchor).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜